forked from rhasspy/wyoming-addons
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
110d04c
commit 3e6418b
Showing
6 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
local/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Changelog | ||
|
||
## 1.0.0 | ||
|
||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
FROM debian:bookworm-slim | ||
ARG TARGETARCH | ||
ARG TARGETVARIANT | ||
|
||
# Install wyoming-whisper-cpp | ||
WORKDIR /usr/src | ||
ENV WYOMING_WHISPER_CPP_VERSION=1.0.0 | ||
ENV PIP_BREAK_SYSTEM_PACKAGES=1 | ||
|
||
RUN \ | ||
apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
curl \ | ||
python3 \ | ||
python3-pip \ | ||
build-essential \ | ||
&& curl -L -s \ | ||
"https://github.com/rhasspy/wyoming-whisper-cpp/archive/refs/tags/v${WYOMING_WHISPER_CPP_VERSION}.tar.gz" \ | ||
| tar -zxvf - -C /tmp \ | ||
&& mv "/tmp/wyoming-whisper-cpp-${WYOMING_WHISPER_CPP_VERSION}" '/usr/share/wyoming-whisper-cpp' \ | ||
&& make -C "/usr/share/wyoming-whisper-cpp/whisper.cpp" main \ | ||
&& pip3 install --no-cache-dir -U \ | ||
setuptools \ | ||
wheel \ | ||
&& pip3 install --no-cache-dir \ | ||
--extra-index-url https://www.piwheels.org/simple \ | ||
-f . \ | ||
"/usr/share/wyoming-whisper-cpp" \ | ||
&& apt-get purge -y --auto-remove \ | ||
build-essential \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
WORKDIR / | ||
COPY run.sh ./ | ||
|
||
EXPOSE 10300 | ||
|
||
ENTRYPOINT ["bash", "/run.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.PHONY: local run update | ||
|
||
VERSION := 1.0.0 | ||
TAG := rhasspy/wyoming-whisper-cpp | ||
PLATFORMS := linux/amd64,linux/arm64,linux/arm/v7 | ||
HOST := 0.0.0.0 | ||
PORT := 10300 | ||
DATA_DIR := $(PWD)/local | ||
|
||
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)" -v "$(DATA_DIR):$(DATA_DIR)" "$(TAG):$(VERSION)" --uri 'tcp://$(HOST):$(PORT)' --data-dir "$(DATA_DIR)" --model 'tiny.en-q5_1' --debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# whisper.cpp | ||
|
||
[Wyoming protocol](https://github.com/rhasspy/wyoming) server for the [whisper.cpp](https://github.com/ggerganov/whisper.cpp) speech to text system. | ||
|
||
[Source](https://github.com/rhasspy/wyoming-whisper-cpp) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env bash | ||
python3 -m wyoming_whisper_cpp \ | ||
--whisper-cpp-dir '/usr/share/wyoming-whisper-cpp/whisper.cpp' \ | ||
--uri 'tcp://0.0.0.0:10300' "$@" |