#HA and SIP/FreePBX errors on Assist

1 messages · Page 1 of 1 (latest)

viscid comet
#

Hi, I am running the latest HA and trying to integrate SIP phones to the voice part. It mostly works - when I 'Disable' the SIP extension on HA, I get the speech saying that its uncofigured. This is good. When I enable and dial HA, I get an error and no audio is processed. Additionally, I am unsure if I need to say the wake word? (e.g. Dial 9000, 'hey jarvis, turn on the lights' )

Below is the error... HA doesn't do anything.

2024-10-12 22:55:41.529 ERROR (MainThread) [homeassistant.components.wyoming.stt] Error processing audio stream Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/voip/assist_satellite.py", line 181, in stt_stream chunk = await self._audio_queue.get() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/asyncio/queues.py", line 158, in get await getter asyncio.exceptions.CancelledError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/wyoming/stt.py", line 106, in async_process_audio_stream async for audio_bytes in stream: File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 953, in _speech_to_text_stream async for chunk in audio_stream: File "/usr/src/homeassistant/homeassistant/components/assist_pipeline/pipeline.py", line 1235, in process_enhance_audio async for dirty_samples in audio_stream: File "/usr/src/homeassistant/homeassistant/components/voip/assist_satellite.py", line 180, in stt_stream async with asyncio.timeout(self._audio_chunk_timeout): File "/usr/local/lib/python3.12/asyncio/timeouts.py", line 115, in __aexit__ raise TimeoutError from exc_val TimeoutError 2024-10-12 22:55:41.539 WARNING (MainThread) [homeassistant.components.voip.assist_satellite] PipelineEvent(type=<PipelineEventType.ERROR: 'error'>, data={'code': 'stt-stream-failed', 'message': 'speech-to-text failed'}, timestamp='2024-10-12T21:55:41.539343+00:00')

high carbon
#

Its the speech to text that fails. Had nothing to do with the sip integration.

The traces at the debug in the voice assistant should give the same error.

viscid comet
#

On the first attempts, you hear the audible BEEP when HA is ready. This only happens once. It never 'Beeps' again on connect until I reboot HA.

high carbon
#

Have you checked the debug at the voice assistant. I told you?

high carbon
viscid comet
#

[20:27:37][D][voice_assistant:637]: Event Type: 11 [20:27:37][D][voice_assistant:793]: Starting STT by VAD [20:27:41][D][voice_assistant:637]: Event Type: 12 [20:27:41][D][voice_assistant:797]: STT by VAD end [20:27:41][D][voice_assistant:514]: State changed from STREAMING_MICROPHONE to STOP_MICROPHONE [20:27:41][D][voice_assistant:520]: Desired state set to AWAITING_RESPONSE [20:27:41][D][voice_assistant:514]: State changed from STOP_MICROPHONE to STOPPING_MICROPHONE [20:27:41][D][voice_assistant:514]: State changed from STOPPING_MICROPHONE to AWAITING_RESPONSE [20:27:44][D][voice_assistant:637]: Event Type: 4 **[20:27:44][D][voice_assistant:665]: Speech recognised as: " Turn on the kitchen light."** [20:27:44][D][voice_assistant:637]: Event Type: 5 [20:27:44][D][voice_assistant:670]: Intent started [20:27:44][D][esp32.preferences:114]: Saving 1 preferences to flash... [20:27:44][D][esp32.preferences:143]: Saving 1 preferences to flash: 1 cached, 0 written, 0 failed [20:27:44][D][voice_assistant:637]: Event Type: 6 [20:27:44][D][voice_assistant:637]: Event Type: 7 **[20:27:44][D][voice_assistant:693]: Response: "Turned on the lights"** [20:27:44][D][voice_assistant:637]: Event Type: 8

high carbon
#

Did you check the debug of your voip speech pipeline like i said

#

Hass can have multiple pipelines so one can work the other one doesnt

viscid comet
#

any hints on where to look for the logs? .. I enabled 'Debug' on the integration and it downloads the same data (as with System->logs->download)

high carbon
#

Settings speech agents. Select agent. Select debugging.

#

You need to select the agent that is using the voip connection. Do a voice command. And it should show up in the debug.

viscid comet
#

using ESPHome or Mobile phone it shows the text and OK

high carbon
#

Oh.

#

Do you use the right sip codec

viscid comet
#

Only one codec works 😄 OPUS

#

When I disable calling on the Voip integration - and call the number, I get the 'Welcome to your Home Assistant, this is currently not configured' message speaking on the phone

#

btw... thank you for your time and helping!

high carbon
#

I have issues too. I dont hear the beep and no response is given. But the command is processed

viscid comet
#

I get the beep ONCE after a fresh HA reboot. never happens again 😄

high carbon
#

Great lets test that out

#

What does the debug say this time

viscid comet
#

exactly the same from my previous logs.... but have to wait a while to reset ... keep the family peace 😛

#

(I am amazed that the family get confused when the kitchen lights dont switch on automatically!)

high carbon
#

Lol

#

Setup a development hass

viscid comet
#

I am going to have to!

high carbon
#

I can reproduce the one one beep per voip interface

viscid comet
#

I am just running FreePbx on a Pi - it works on the 3 Voip lines I have, so I am confident that bit is OK

high carbon
#

Its asterisk underwater right. You can look at those tracing.

#

I gona create a bug for the one beeb only

viscid comet
#

yeah... Asterisk under.. The logs there dont show anthing 'Call established' and terminated. it doesnt show anything bad

high carbon
#

If you run asterisk -r -vvvv in console you get verbose info

high carbon
#

My guess is that according to the debug. Your sip phone does not sent voice to the voip integration

viscid comet
#

or HA cant decode the voice packets

#

I wonder if HA needs some libopus or something like that

high carbon
#

I have to download some packages to translate my asterisk to opus.

viscid comet
#

on FreePBX, it shows opus as 'loaded' and active in the management console

#

for that trunk only. I am going to find some other opus SIP clients and test more. (I dont think thats the problem, but will eliminate the obvious)

high carbon
#

Is there translation between opus and the codec of your phone. Asterisk -r -vvvv wil tell

high carbon
#

@viscid comet i now have the same problem as you have. 2024.9.1 does not has the issue

viscid comet
#

Thanks! Nice to know I am not the only one 😄