Voice Preview Edition - TTS not working

I’ve just set up my first Voice PE device. To test it I say “Okay Nabu, what is the time”.
The LEDs flash but I don’t get a response. I’ve dialled the volume up.

In the logs I can see Speech-to-Text, NLP and Text-to-Speech all happening - see logs below.

The LEDs seem to indicate the different stages - Okay Nabu; Listening to my command; thinking about the answer; playing the answer.

In Assist Debug if I press “Play Audio” it pauses and then eventually pops up “error playing audio”

stage: done
run:
  pipeline: 01jgktxsznxz87r6xq0xjdaq3w
  language: en
events:
  - type: run-start
    data:
      pipeline: 01jgktxsznxz87r6xq0xjdaq3w
      language: en
    timestamp: "2025-01-02T17:04:14.980208+00:00"
  - type: stt-start
    data:
      engine: stt.faster_whisper
      metadata:
        language: en
        format: wav
        codec: pcm
        bit_rate: 16
        sample_rate: 16000
        channel: 1
    timestamp: "2025-01-02T17:04:14.980411+00:00"
  - type: stt-vad-start
    data:
      timestamp: 1020
    timestamp: "2025-01-02T17:04:15.982265+00:00"
  - type: stt-vad-end
    data:
      timestamp: 3000
    timestamp: "2025-01-02T17:04:17.959234+00:00"
  - type: stt-end
    data:
      stt_output:
        text: " What is the time?"
    timestamp: "2025-01-02T17:04:20.789912+00:00"
  - type: intent-start
    data:
      engine: conversation.home_assistant
      language: en
      intent_input: " What is the time?"
      conversation_id: null
      device_id: 55f6f89b906673a36a51d488cbba634f
      prefer_local_intents: false
    timestamp: "2025-01-02T17:04:20.790142+00:00"
  - type: intent-end
    data:
      processed_locally: true
      intent_output:
        response:
          speech:
            plain:
              speech: 5:04 PM
              extra_data: null
          card: {}
          language: en
          response_type: action_done
          speech_slots:
            time: "17:04:20.792214"
          data:
            targets: []
            success: []
            failed: []
        conversation_id: null
    timestamp: "2025-01-02T17:04:20.795499+00:00"
  - type: tts-start
    data:
      engine: tts.piper
      language: en_GB
      voice: en_GB-southern_english_female-low
      tts_input: 5:04 PM
    timestamp: "2025-01-02T17:04:20.795705+00:00"
  - type: tts-end
    data:
      tts_output:
        media_id: >-
          media-source://tts/tts.piper?message=5:04+PM&language=en_GB&tts_options=%7B%22voice%22:%22en_GB-southern_english_female-low%22,%22preferred_format%22:%22flac%22,%22preferred_sample_rate%22:48000,%22preferred_sample_channels%22:1,%22preferred_sample_bytes%22:2%7D
        url: /api/tts_proxy/SIzB4nh91cG-BfOGVRhnnA.flac
        mime_type: audio/flac
    timestamp: "2025-01-02T17:04:20.796646+00:00"
  - type: run-end
    data: null
    timestamp: "2025-01-02T17:04:20.796836+00:00"
stt:
  engine: stt.faster_whisper
  metadata:
    language: en
    format: wav
    codec: pcm
    bit_rate: 16
    sample_rate: 16000
    channel: 1
  done: true
  stt_output:
    text: " What is the time?"
intent:
  engine: conversation.home_assistant
  language: en
  intent_input: " What is the time?"
  conversation_id: null
  device_id: 55f6f89b906673a36a51d488cbba634f
  prefer_local_intents: false
  done: true
  processed_locally: true
  intent_output:
    response:
      speech:
        plain:
          speech: 5:04 PM
          extra_data: null
      card: {}
      language: en
      response_type: action_done
      speech_slots:
        time: "17:04:20.792214"
      data:
        targets: []
        success: []
        failed: []
    conversation_id: null
tts:
  engine: tts.piper
  language: en_GB
  voice: en_GB-southern_english_female-low
  tts_input: 5:04 PM
  done: true
  tts_output:
    media_id: >-
      media-source://tts/tts.piper?message=5:04+PM&language=en_GB&tts_options=%7B%22voice%22:%22en_GB-southern_english_female-low%22,%22preferred_format%22:%22flac%22,%22preferred_sample_rate%22:48000,%22preferred_sample_channels%22:1,%22preferred_sample_bytes%22:2%7D
    url: /api/tts_proxy/SIzB4nh91cG-BfOGVRhnnA.flac
    mime_type: audio/flac

I have the same issue! I can see in the “logbook” of the Voice device that it goes through the stages of idle->listening->processing->responding->playing-idle, etc, when I wake it with “ok nabu”. The LEDs flash and it plays the little chime when I activate it so I guess there’s nothing wrong with the speaker hardware-wise. But it acts just as if it’s playing through a non-working speaker…

Where do you find the logs?

@comatose_tortoise yes, that’s the same failure mode as mine.

You can find the details under Settings > Voice Assistants

Found the issue. My Home Assistant local URL was set to the wrong IP. Check in Settings → Network

Hmmm… not the issue for me I think.

I can see the piper logs at http://homeassistant.local:8123/hassio/addon/core_piper/logs

FileNotFoundError: [Errno 2] No such file or directory: ''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/wyoming/server.py", line 41, in run
    if not (await self.handle_event(event)):
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/wyoming_piper/handler.py", line 50, in handle_event
    await self.write_event(
  File "/usr/local/lib/python3.11/dist-packages/wyoming/server.py", line 29, in write_event
    await async_write_event(event, self.writer)
  File "/usr/local/lib/python3.11/dist-packages/wyoming/event.py", line 131, in async_write_event
    await writer.drain()
  File "/usr/lib/python3.11/asyncio/streams.py", line 378, in drain
    await self._protocol._drain_helper()
  File "/usr/lib/python3.11/asyncio/streams.py", line 167, in _drain_helper
    raise ConnectionResetError('Connection lost')
ConnectionResetError: Connection lost
WARNING:wyoming_piper.download:Wrong size (expected=63104526, actual=60709344) for /data/en_US-amy-low.onnx
INFO:wyoming_piper.download:Downloaded /data/en_US-amy-low.onnx (https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_US/amy/low/en_US-amy-low.onnx)
ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='wyoming event handler' coro=<AsyncEventHandler.run() done, defined at /usr/local/lib/python3.11/dist-packages/wyoming/server.py:31> exception=FileNotFoundError(2, 'No such file or directory')>
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/dist-packages/wyoming/server.py", line 41, in run
    if not (await self.handle_event(event)):
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/wyoming_piper/handler.py", line 53, in handle_event
    raise err
  File "/usr/local/lib/python3.11/dist-packages/wyoming_piper/handler.py", line 48, in handle_event
    return await self._handle_event(event)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/wyoming_piper/handler.py", line 108, in _handle_event
    wav_file: wave.Wave_read = wave.open(output_path, "rb")
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/wave.py", line 630, in open
    return Wave_read(f)
           ^^^^^^^^^^^^
  File "/usr/lib/python3.11/wave.py", line 280, in __init__
    f = builtins.open(f, 'rb')
        ^^^^^^^^^^^^^^^^^^^^^^

@comatose_tortoise Can I ask which Voice you are using here, please?
http://homeassistant.local:8123/hassio/addon/core_piper/config

Can’t help you there unfortunately, I’m using HA Cloud for all TTS and STT.

Thanks. I bit the bullet and subscribed to Nabu Casa.

I have the same issue.

Wake word works
Listens and does the command
No reply

I cannot get it to work by calling the tts service manually either :confused:

Here are the logs:

stage: done
run:
  pipeline: 01jh0xhkgjq6kxthcv20vn927f
  language: sv
events:
  - type: run-start
    data:
      pipeline: 01jh0xhkgjq6kxthcv20vn927f
      language: sv
    timestamp: "2025-01-07T20:36:23.885139+00:00"
  - type: stt-start
    data:
      engine: stt.home_assistant_cloud
      metadata:
        language: sv-SE
        format: wav
        codec: pcm
        bit_rate: 16
        sample_rate: 16000
        channel: 1
    timestamp: "2025-01-07T20:36:23.885484+00:00"
  - type: stt-vad-start
    data:
      timestamp: 1210
    timestamp: "2025-01-07T20:36:26.152674+00:00"
  - type: stt-vad-end
    data:
      timestamp: 2800
    timestamp: "2025-01-07T20:36:26.655097+00:00"
  - type: stt-end
    data:
      stt_output:
        text: Berätta ett skönt.
    timestamp: "2025-01-07T20:36:27.227517+00:00"
  - type: intent-start
    data:
      engine: 01JH0K7A6C2V4EPCDP6ZXYNGPT
      language: sv
      intent_input: Berätta ett skönt.
      conversation_id: 01JH17ENC7ZHX4S0C93564S5F8
      device_id: dbb8fc2fd4705899497de1de109e9fdf
      prefer_local_intents: true
    timestamp: "2025-01-07T20:36:27.227988+00:00"
  - type: intent-end
    data:
      processed_locally: false
      intent_output:
        response:
          speech:
            plain:
              speech: >-
                Jag kan inte berätta skämt, men jag kan hjälpa dig med något
                annat. Vad vill du ha hjälp med?
              extra_data: null
          card: {}
          language: sv
          response_type: action_done
          data:
            targets: []
            success: []
            failed: []
        conversation_id: 01JH17ENC7ZHX4S0C93564S5F8
    timestamp: "2025-01-07T20:36:28.883199+00:00"
  - type: tts-start
    data:
      engine: tts.home_assistant_cloud
      language: sv-SE
      voice: SofieNeural
      tts_input: >-
        Jag kan inte berätta skämt, men jag kan hjälpa dig med något annat. Vad
        vill du ha hjälp med?
    timestamp: "2025-01-07T20:36:28.886073+00:00"
  - type: tts-end
    data:
      tts_output:
        media_id: >-
          media-source://tts/tts.home_assistant_cloud?message=Jag+kan+inte+ber%C3%A4tta+sk%C3%A4mt,+men+jag+kan+hj%C3%A4lpa+dig+med+n%C3%A5got+annat.+Vad+vill+du+ha+hj%C3%A4lp+med?&language=sv-SE&tts_options=%7B%22voice%22:%22SofieNeural%22,%22preferred_format%22:%22flac%22,%22preferred_sample_rate%22:48000,%22preferred_sample_channels%22:1,%22preferred_sample_bytes%22:2%7D
        url: /api/tts_proxy/brgC0onfKc7Q7DaXFs1Qjg.flac
        mime_type: audio/flac
    timestamp: "2025-01-07T20:36:28.889200+00:00"
  - type: run-end
    data: null
    timestamp: "2025-01-07T20:36:28.889884+00:00"
stt:
  engine: stt.home_assistant_cloud
  metadata:
    language: sv-SE
    format: wav
    codec: pcm
    bit_rate: 16
    sample_rate: 16000
    channel: 1
  done: true
  stt_output:
    text: Berätta ett skönt.
intent:
  engine: 01JH0K7A6C2V4EPCDP6ZXYNGPT
  language: sv
  intent_input: Berätta ett skönt.
  conversation_id: 01JH17ENC7ZHX4S0C93564S5F8
  device_id: dbb8fc2fd4705899497de1de109e9fdf
  prefer_local_intents: true
  done: true
  processed_locally: false
  intent_output:
    response:
      speech:
        plain:
          speech: >-
            Jag kan inte berätta skämt, men jag kan hjälpa dig med något annat.
            Vad vill du ha hjälp med?
          extra_data: null
      card: {}
      language: sv
      response_type: action_done
      data:
        targets: []
        success: []
        failed: []
    conversation_id: 01JH17ENC7ZHX4S0C93564S5F8
tts:
  engine: tts.home_assistant_cloud
  language: sv-SE
  voice: SofieNeural
  tts_input: >-
    Jag kan inte berätta skämt, men jag kan hjälpa dig med något annat. Vad vill
    du ha hjälp med?
  done: true
  tts_output:
    media_id: >-
      media-source://tts/tts.home_assistant_cloud?message=Jag+kan+inte+ber%C3%A4tta+sk%C3%A4mt,+men+jag+kan+hj%C3%A4lpa+dig+med+n%C3%A5got+annat.+Vad+vill+du+ha+hj%C3%A4lp+med?&language=sv-SE&tts_options=%7B%22voice%22:%22SofieNeural%22,%22preferred_format%22:%22flac%22,%22preferred_sample_rate%22:48000,%22preferred_sample_channels%22:1,%22preferred_sample_bytes%22:2%7D
    url: /api/tts_proxy/brgC0onfKc7Q7DaXFs1Qjg.flac
    mime_type: audio/flac

any ideas?

I ran into the same issues, resetting the device with these instructions got it working again Resetting the device – Home Assistant Voice Preview Edition

Just like to echo that I to had this issue, on first install it gave an error saying it couldn’t connect, but it was visible in HA, and would complete commands, but wouldn’t give any responses.

One factory reset later and it worked, but it did failed setting up from a PC, but once I added it manually the wizard appeared and it seems to now be working.

I had the same Problem as the people above. I reset the device and now it is halfway working. I can browse media select TTS, select the media player and play the text on the device, but if I try to use a script to announce or tts speak it does not work. And if I ask it something where I should have gotten a response, I hear nothing. The logs are saying that the device is responding but I don’t hear anything.

I had the same issue. I could ask questions and give commands that were completed successfully.
When it was supposed to answer, the ring flashed briefly but I got no voice reply nor confirmation.
It turned out that my local network settings (set in configuration.yaml) were wrong (and probably have been ever since I configured HTTPS) - preventing the Voice PE from communicating correctly with the rest of HA, even though some things worked.

I did not make a screenshot of the error message, but this is the place I saw it (settings → network)


And this is the error message I got:
Screenshot 2025-01-18 133142

I removed the settings from configuration.yaml, and it works great now :slight_smile: