Merge pull request #14 from makaveli10/dockerize

Add Dockerfile.
This commit is contained in:
Marcus Edel
2023-07-11 07:39:38 -04:00
committed by GitHub
4 changed files with 65 additions and 6 deletions
+44
View File
@@ -0,0 +1,44 @@
FROM nvidia/cuda:11.2.2-cudnn8-devel-ubuntu20.04
ARG DEBIAN_FRONTEND=noninteractive
# Remove any third-party apt sources to avoid issues with expiring keys.
RUN rm -f /etc/apt/sources.list.d/*.list
# Install some basic utilities.
RUN apt-get update && apt-get install -y \
curl \
ca-certificates \
sudo \
git \
bzip2 \
libx11-6 \
&& rm -rf /var/lib/apt/lists/*
RUN apt update
# install python
RUN apt install software-properties-common -y && \
add-apt-repository ppa:deadsnakes/ppa && \
apt update
RUN apt install python3-dev -y && \
apt install python-is-python3
# install pip
RUN apt install python3-pip -y
# Create a working directory.
RUN mkdir /app
WORKDIR /app
COPY setup.sh /app
COPY requirements/ /app
RUN bash setup.sh
RUN pip install -r server.txt
COPY *py /app
CMD ["python", "server.py"]
+17 -2
View File
@@ -46,13 +46,28 @@ Unlike traditional speech recognition systems that rely on continuous audio stre
```
This would start the websocket server on port ```9090```.
### Chrome Extension
- Head over to ```Audio-Transcription``` module to unpack and load a chrome extension to capture any audio in the browser and send it to the websocket server to transcribe the audio in the current tab.
- Head over to ```Audio-Transcription``` module to unpack and load a chrome extension to capture any audio in the browser(only Chrome for now) and send it to the websocket server to transcribe the audio in the current tab.
### Firefox Extension
- Refer to [Audio-Transcription-Firefox](https://github.com/collabora/whisper-live/tree/main/Audio-Transcription-Firefox#readme) to use mozilla firefox extension.
## Whisper Live Server in Docker
- Build docker container
```bash
docker build . -t whisper-live
```
- Run docker container
```bash
docker run -it --gpus all -p 9090:9090 whisper-live:latest
```
## Future Work
- [ ] Update Documentation.
- [ ] Keep only a single server implementation i.e. websockets and get rid of the socket implementation in ```server.py```. Also, update ```client.py``` to websockets-client implemenation.
- [x] Keep only a single server implementation i.e. websockets and get rid of the socket implementation in ```server.py```. Also, update ```client.py``` to websockets-client implemenation.
- [ ] Add translation to other languages on top of transcription.
## Citations
+3 -3
View File
@@ -1,6 +1,6 @@
PyAudio
faster-whisper==0.6.0
paho-mqtt
--extra-index-url https://download.pytorch.org/whl/cu113
torch==1.12.1
--extra-index-url https://download.pytorch.org/whl/cu111
torch==1.10.1
torchaudio==0.10.1
websockets
+1 -1
View File
@@ -277,5 +277,5 @@ class ServeClient:
if __name__ == "__main__":
with serve(recv_audio, "127.0.0.1", 9090) as server:
with serve(recv_audio, "0.0.0.0", 9090) as server:
server.serve_forever()