core: Whisper not working does not respond to voice commands

The problem

does not respond to voice commands

What version of Home Assistant Core has the issue?

Home Assistant 2023.5.0b8

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Whisper

Link to integration documentation on our website

https://www.home-assistant.io/integrations/wyoming/

Diagnostics information

Logger: homeassistant.components.wyoming.stt
Source: components/wyoming/stt.py:91
Integration: Wyoming Protocol (documentation, issues)
First occurred: 07:59:45 (1 occurrences)
Last logged: 07:59:45

Error processing audio stream: [Errno 104] Connection reset by peer
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/wyoming/stt.py", line 107, in async_process_audio_stream
    await client.write_event(chunk.event())
  File "/usr/local/lib/python3.10/site-packages/wyoming/client.py", line 22, in write_event
    await async_write_event(event, self._writer)
  File "/usr/local/lib/python3.10/site-packages/wyoming/event.py", line 77, in async_write_event
    await writer.drain()
  File "/usr/local/lib/python3.10/asyncio/streams.py", line 371, in drain
    await self._protocol._drain_helper()
  File "/usr/local/lib/python3.10/asyncio/streams.py", line 173, in _drain_helper
    await waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/wyoming/stt.py", line 91, in async_process_audio_stream
    async with AsyncTcpClient(self.service.host, self.service.port) as client:
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 949, in _write_ready
    n = self._sock.send(self._buffer)
ConnectionResetError: [Errno 104] Connection reset by peer

Example YAML snippet

[
  {
    "init_options": {
      "start_stage": "stt",
      "end_stage": "tts",
      "input": {
        "sample_rate": 48000
      },
      "pipeline": "01gzccz3229t3xx77nvwsf7avt",
      "conversation_id": null
    },
    "stage": "error",
    "run": {
      "pipeline": "01gzccz3229t3xx77nvwsf7avt",
      "language": "lt",
      "runner_data": {
        "stt_binary_handler_id": 5,
        "timeout": 30
      }
    },
    "events": [
      {
        "type": "run-start",
        "data": {
          "pipeline": "01gzccz3229t3xx77nvwsf7avt",
          "language": "lt",
          "runner_data": {
            "stt_binary_handler_id": 5,
            "timeout": 30
          }
        },
        "timestamp": "2023-05-03T05:08:17.678626+00:00"
      },
      {
        "type": "stt-start",
        "data": {
          "engine": "stt.faster_whisper",
          "metadata": {
            "language": "lt",
            "format": "wav",
            "codec": "pcm",
            "bit_rate": 16,
            "sample_rate": 16000,
            "channel": 1
          }
        },
        "timestamp": "2023-05-03T05:08:17.678984+00:00"
      },
      {
        "type": "error",
        "data": {
          "code": "stt-stream-failed",
          "message": "Speech to text failed"
        },
        "timestamp": "2023-05-03T05:08:25.632626+00:00"
      }
    ],
    "stt": {
      "engine": "stt.faster_whisper",
      "metadata": {
        "language": "lt",
        "format": "wav",
        "codec": "pcm",
        "bit_rate": 16,
        "sample_rate": 16000,
        "channel": 1
      },
      "done": false
    },
    "error": {
      "code": "stt-stream-failed",
      "message": "Speech to text failed"
    }
  },
  {
    "init_options": {
      "start_stage": "stt",
      "end_stage": "tts",
      "input": {
        "sample_rate": 48000
      },
      "pipeline": "01gzccz3229t3xx77nvwsf7avt",
      "conversation_id": null
    },
    "stage": "error",
    "run": {
      "pipeline": "01gzccz3229t3xx77nvwsf7avt",
      "language": "lt",
      "runner_data": {
        "stt_binary_handler_id": 4,
        "timeout": 30
      }
    },
    "events": [
      {
        "type": "run-start",
        "data": {
          "pipeline": "01gzccz3229t3xx77nvwsf7avt",
          "language": "lt",
          "runner_data": {
            "stt_binary_handler_id": 4,
            "timeout": 30
          }
        },
        "timestamp": "2023-05-03T05:07:39.571087+00:00"
      },
      {
        "type": "stt-start",
        "data": {
          "engine": "stt.faster_whisper",
          "metadata": {
            "language": "lt",
            "format": "wav",
            "codec": "pcm",
            "bit_rate": 16,
            "sample_rate": 16000,
            "channel": 1
          }
        },
        "timestamp": "2023-05-03T05:07:39.571431+00:00"
      },
      {
        "type": "error",
        "data": {
          "code": "timeout",
          "message": "Timeout running pipeline"
        },
        "timestamp": "2023-05-03T05:08:09.571883+00:00"
      }
    ],
    "stt": {
      "engine": "stt.faster_whisper",
      "metadata": {
        "language": "lt",
        "format": "wav",
        "codec": "pcm",
        "bit_rate": 16,
        "sample_rate": 16000,
        "channel": 1
      },
      "done": false
    },
    "error": {
      "code": "timeout",
      "message": "Timeout running pipeline"
    }
  },
  {
    "init_options": {
      "start_stage": "stt",
      "end_stage": "tts",
      "input": {
        "sample_rate": 48000
      },
      "pipeline": "01gzccz3229t3xx77nvwsf7avt",
      "conversation_id": null
    },
    "stage": "error",
    "run": {
      "pipeline": "01gzccz3229t3xx77nvwsf7avt",
      "language": "lt",
      "runner_data": {
        "stt_binary_handler_id": 3,
        "timeout": 30
      }
    },
    "events": [
      {
        "type": "run-start",
        "data": {
          "pipeline": "01gzccz3229t3xx77nvwsf7avt",
          "language": "lt",
          "runner_data": {
            "stt_binary_handler_id": 3,
            "timeout": 30
          }
        },
        "timestamp": "2023-05-03T05:07:03.246925+00:00"
      },
      {
        "type": "stt-start",
        "data": {
          "engine": "stt.faster_whisper",
          "metadata": {
            "language": "lt",
            "format": "wav",
            "codec": "pcm",
            "bit_rate": 16,
            "sample_rate": 16000,
            "channel": 1
          }
        },
        "timestamp": "2023-05-03T05:07:03.247181+00:00"
      },
      {
        "type": "error",
        "data": {
          "code": "timeout",
          "message": "Timeout running pipeline"
        },
        "timestamp": "2023-05-03T05:07:33.248955+00:00"
      }
    ],
    "stt": {
      "engine": "stt.faster_whisper",
      "metadata": {
        "language": "lt",
        "format": "wav",
        "codec": "pcm",
        "bit_rate": 16,
        "sample_rate": 16000,
        "channel": 1
      },
      "done": false
    },
    "error": {
      "code": "timeout",
      "message": "Timeout running pipeline"
    }
  }
]

Anything in the logs that might be useful for us?

No response

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 3
  • Comments: 28 (14 by maintainers)

Most upvoted comments

I just got this resolved by accident. On the integrations page HA was still waiting for confirmation to connect to the Whisper Wyoming service. Once I clicked configure there everything showed up as it should.