Hi,
I’m working on creating a Wyoming service that acts as a proxy between Home Assistant and an STT service. My idea is that this proxy will apply sentence correction logic similar to what Wyoming Vosk provides, so that this feature can be available for any STT service compatible with the Wyoming protocol.
In simple terms, the proxy works as follows:
It exposes a Wyoming endpoint (e.g., 10301) and connects to an STT service on another port (e.g., 10300).
Home Assistant sends audio events to the proxy at 10301; the proxy transparently forwards them to 10300.
The STT responds with a transcription on 10300.
The proxy receives the transcription, applies sentence correction logic,
Then it returns the corrected sentence to Home Assistant.
Additionally, the proxy also handles the Describe event so it can function as a fully transparent proxy.
Regarding this, I have two questions:
Is my approach of adding sentence correction as a proxy acceptable or reasonable? This way, I can add sentence correction to any Wyoming-compatible STT service (it is already working with wyoming faster whisper). However, this wouldn’t work for STT services integrated directly into Home Assistant, such as Google Cloud or Nabu Casa’s subscription-based STT. Ideally, sentence correction would be part of the Assist pipeline in Home Assistant, with correction services implemented via Wyoming, but as far as I know, this doesn’t exist.
Or is there a better way?
In my proof of concept, I’m using the sentence correction code from Wyoming Vosk (I literally copied the sentences.py file).
@clear python , would it be okay if I use your code for my proxy?
By the way, I’m not a Python developer, so my code isn’t pretty or high quality—just functional for now. If I have Mike’s permission to use the Vosk sentence corrector, I could release an initial version in the next few days.
EDIT:
First, more or less, working version here:
https://github.com/Cheerpipe/wyoming_rapidfuzz_proxy
Thanks in advance!
Contribute to Cheerpipe/wyoming_rapidfuzz_proxy development by creating an account on GitHub.