Vosk: Only possible for hassio users?

Could you show the content of your it folder and your log output?

It seems you are using the wrong ports in your docker-compose.yaml :slight_smile:

You are mapping the hosts 10500 to the containers port 10500, but inside the container vosk is listening on 10300.

So you need to either change the mapping to 10500:10300 or to 10300:10300 and then point the HA integration to port 10300 :slight_smile:

That’s it:

change the mapping to 10500:10300 

Wow, a quick test figured out that vosk is faster as faster-whisper, for sure… :smiling_face_with_three_hearts:
thank you so much!

1 Like

@Kiesel thanks! I finally have a vosk running on my unraid server with normal (not small) italian model.

But i’m still running on a issue that can’t understand is related to my setting, my language or a vosk general bug.

I created a file both in the folder “sentences” of the container and in “custom_sentences” within home assistant with “skip_words” to avoid some mismatch but it does not work.

@brunopiras maybe you also faced this?

Below details:

content of _common.yaml :

skip_words:

  • “e”
  • “a”

debug log within the container:

DEBUG:root:Transcript for client 988532886902325: e dove si trova irene
DEBUG:root:Client disconnected: 988532886902325
DEBUG:root:Client connected: 988548792181924
DEBUG:root:Loaded recognizer in 0.00 second(s)
DEBUG:root:Transcript for client 988548792181924: e dove si trova irene
DEBUG:root:Client disconnected: 988548792181924
DEBUG:root:Client connected: 988559958834937
DEBUG:root:Loaded recognizer in 0.00 second(s)
DEBUG:root:Transcript for client 988559958834937: e dove si trova marco
DEBUG:root:Client disconnected: 988559958834937
DEBUG:root:Client connected: 988575006419908

as you can se “e” is still detected and make the intent fail.

Any tip?

Sorry, I don’t use the skip words feature myself. Did you have a chance to ask on vosks github?

no but maybe I’ll ask on rhasspy vosk because I think that the wyoming protocol of vosk may be different from original vosk.

Your post was at the top of Google when I researched so I figured that I would share the solution I ended up with. This uses the Vosk image from Rhasspy:

services:
  vosk:
    image: rhasspy/wyoming-vosk
    command: >-
      --correct-sentences 0.0
      --preload-language en
      --model-for-language en vosk-model-small-en-us-0.15
      --debug
      --limit-sentences
      --download-dir /data
      --database-dir /data
      --data-dir /data
      --data-dir /models
      --sentences-dir /sentences
    volumes:
      - data:/data
      - ./sentences:/sentences:ro
      - ./models:/models:ro
    ports:
      - 10300:10300
    restart: unless-stopped