Skip to content

Instantly share code, notes, and snippets.

@chrisdone-artificial
Forked from chrisdone/alphacephei.Dockerfile
Last active September 26, 2022 08:12
Show Gist options
  • Save chrisdone-artificial/f9ca8eab1a8d1b2b7b7f67cc38693438 to your computer and use it in GitHub Desktop.
Save chrisdone-artificial/f9ca8eab1a8d1b2b7b7f67cc38693438 to your computer and use it in GitHub Desktop.
FROM ubuntu:20.04
RUN apt-get update -y
RUN apt-get install -y python pip
COPY . /home/chris/Work/alphacephei/vosk-server
WORKDIR /home/chris/Work/alphacephei/vosk-server
RUN pip install -r requirements.txt && pip3 install sounddevice
RUN apt-get install -y libportaudio2
docker run -p 2700:2700 -v`pwd`/vosk-model-small-en-us-0.15/:/opt/vosk-model-en/model alphacep/kaldi-en:latest
docker image build . -f ~/Docker/alphacephei.Dockerfile -t alphacephei
## Linux
docker run --privileged -v`pwd`:`pwd` -w`pwd`/websocket -it --rm --net=host alphacephei ./test_microphone.py -u ws://localhost:2700
Works!
## macOS
/Library/Developer/CommandLineTools/usr/bin/python3 -m pip install --upgrade pip
pip3 install -r requirements.txt && pip3 install sounddevice
websocket/test_microphone.py -u ws://localhost:2700
Does not work. :-(
{
"partial" : ""
}
{
"partial" : ""
}
{
"partial" : ""
}
{
"partial" : ""
}
Works if you run the server in the macOS environment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment