WebRTC icon indicating copy to clipboard operation
WebRTC copied to clipboard

TTS to WebRTC media Player

Open MikeFlare303 opened this issue 5 months ago • 1 comments

This comes always, if I try to send an tts to a WebRTC Cam as media player. Befor update of HASS to 2025.6 it was working

Logger: homeassistant.components.websocket_api.http.connection Quelle: components/websocket_api/commands.py:250 Integration: Home Assistant WebSocket API (Dokumentation, Probleme) Erstmals aufgetreten: 18:08:38 (6 Vorkommnisse) Zuletzt protokolliert: 18:13:20

[546878065856] Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 250, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<7 lines>... ) ^ File "/usr/src/homeassistant/homeassistant/core.py", line 2802, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2845, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ hass, entity, func, data, call.context ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call result = await task ^^^^^^^^^^ File "/config/custom_components/webrtc/media_player.py", line 74, in async_play_media assert r.ok ^^^^ AssertionError

MikeFlare303 avatar Jun 15 '25 16:06 MikeFlare303

you might try tts.google_translate service instead of tts.speak

altserg avatar Jun 24 '25 11:06 altserg

It is difficult to understand the cause of the problem from this data. You need to look for the reason in the go2rtc logs.

AlexxIT avatar Jul 07 '25 03:07 AlexxIT

Got it and found the problem. A while ago I changed the protocol from tapo to rtsp, because I guess it responses faster/quicker. But on the other hand like this I missed the 2way audio for the mediaplayer config.

Now I defined them 2 times at go2rtc.yaml Ones as rtsp and ones as tapo stream only to be a mediaplayer.

😊 Thanks for responses 🙂

MikeFlare303 avatar Jul 08 '25 14:07 MikeFlare303