fix: skip gateway voice reply for all platforms on voice input
Base adapter auto-TTS already generates and sends audio for voice messages in _process_message_background. The gateway runner's _send_voice_reply was causing double audio on all platforms (not just Web). Now skip_double applies to any voice input regardless of platform.
This commit is contained in:
parent
62e75cd158
commit
095815d520
1 changed files with 4 additions and 4 deletions
|
|
@ -1635,10 +1635,10 @@ class GatewayRunner:
|
||||||
)
|
)
|
||||||
for msg in agent_messages
|
for msg in agent_messages
|
||||||
)
|
)
|
||||||
# Skip if voice input on Web platform — base adapter auto-TTS
|
# Skip if voice input — base adapter auto-TTS in
|
||||||
# already sent play_audio, so sending another would be double.
|
# _process_message_background already sent audio for voice
|
||||||
is_web = (source.platform == Platform.WEB)
|
# messages, so sending another would be double.
|
||||||
skip_double = is_web and is_voice_input
|
skip_double = is_voice_input
|
||||||
logger.info("Voice reply: has_agent_tts=%s, skip_double=%s, calling _send_voice_reply", has_agent_tts, skip_double)
|
logger.info("Voice reply: has_agent_tts=%s, skip_double=%s, calling _send_voice_reply", has_agent_tts, skip_double)
|
||||||
if not has_agent_tts and not skip_double:
|
if not has_agent_tts and not skip_double:
|
||||||
await self._send_voice_reply(event, response)
|
await self._send_voice_reply(event, response)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue