Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Docker-only builds for Home Assistant add-ons that use the [Wyoming protocol](ht
* [microWakeWord](https://hub.docker.com/r/rhasspy/wyoming-microwakeword) ([Add-on](https://github.com/rhasspy/hassio-addons/tree/master/microwakeword/README.md))
* [rhasspy-speech](https://hub.docker.com/r/rhasspy/wyoming-rhasspy-speech) ([Add-on](https://github.com/rhasspy/hassio-addons/tree/master/rhasspy-speech/README.md))
* [speech-to-phrase](https://hub.docker.com/r/rhasspy/wyoming-speech-to-phrase) ([Add-on](https://github.com/home-assistant/addons/blob/master/speech_to_phrase/README.md))
* [stt-fallback](https://hub.docker.com/r/rhasspy/wyoming-stt-fallback) ([Add-on](https://github.com/rhasspy/hassio-addons/blob/master/stt-fallback/README.md))


## Run Whisper
Expand Down
5 changes: 5 additions & 0 deletions stt-fallback/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

## 1.0.0

- Initial release
41 changes: 41 additions & 0 deletions stt-fallback/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
FROM debian:bookworm-slim
ARG TARGETARCH
ARG TARGETVARIANT

# Install stt-fallback
WORKDIR /usr/src
ENV STT_FALLBACK_VERSION=1.0.0
ENV COMMIT=f3ed8114eddc11382552e1c3a4329c0b7c823ce4

RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-dev \
python3-venv \
curl \
libarchive-tools \
\
&& mkdir ./tools \
&& curl --location --output - \
"https://github.com/rhasspy/hassio-addons/archive/${COMMIT}.zip" | \
bsdtar -C ./tools -xf - \
&& mv ./tools/hassio-addons-${COMMIT}/stt-fallback/src ./tools/stt-fallback \
&& mv ./tools/hassio-addons-${COMMIT}/stt-fallback/requirements.txt ./tools/stt-fallback \
&& rm -rf ./tools/hassio-addons-${COMMIT} \
&& python3 -m venv .venv \
&& .venv/bin/pip3 install --no-cache-dir \
-r ./tools/stt-fallback/requirements.txt \
&& apt-get remove --yes build-essential libarchive-tools curl \
&& apt-get autoremove --yes \
&& apt-get clean \
&& apt-get purge \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /
COPY run.sh ./

EXPOSE 10300

ENTRYPOINT ["bash", "/run.sh"]
19 changes: 19 additions & 0 deletions stt-fallback/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.PHONY: local run update

VERSION := 1.0.0
TAG := rhasspy/wyoming-stt-fallback
PLATFORMS := linux/amd64,linux/arm64
HOST := 0.0.0.0
PORT := 10300

all:
docker buildx build . --platform "$(PLATFORMS)" --tag "$(TAG):$(VERSION)" --push

update:
docker buildx build . --platform "$(PLATFORMS)" --tag "$(TAG):latest" --push

local:
docker build . -t "$(TAG):$(VERSION)" --build-arg TARGETARCH=amd64

run:
docker run -it -p '$(PORT):$(PORT)' "$(TAG):$(VERSION)" --uri 'tcp://$(HOST):$(PORT)' --debug
4 changes: 4 additions & 0 deletions stt-fallback/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
cd /usr/src || exit 1
.venv/bin/python3 /usr/src/tools/stt-fallback/stt_fallback.py \
--uri 'tcp://0.0.0.0:10300' "$@"