Feat: docker whisper-cuda
This commit is contained in:
6
Makefile
6
Makefile
@@ -22,8 +22,6 @@ build-whisper: ## Build whisper.cpp from source in batteries directory
|
|||||||
git clone https://github.com/ggml-org/whisper.cpp.git batteries/whisper.cpp; \
|
git clone https://github.com/ggml-org/whisper.cpp.git batteries/whisper.cpp; \
|
||||||
fi
|
fi
|
||||||
cd batteries/whisper.cpp && make build
|
cd batteries/whisper.cpp && make build
|
||||||
@echo "Creating symlink to whisper-cli binary..."
|
|
||||||
@ln -sf batteries/whisper.cpp/build/bin/whisper-cli ./whisper-cli
|
|
||||||
@echo "Whisper binary built successfully!"
|
@echo "Whisper binary built successfully!"
|
||||||
|
|
||||||
download-whisper-model: ## Download Whisper model for STT in batteries directory
|
download-whisper-model: ## Download Whisper model for STT in batteries directory
|
||||||
@@ -32,9 +30,7 @@ download-whisper-model: ## Download Whisper model for STT in batteries directory
|
|||||||
echo "Please run 'make setup-whisper' first to clone the repository."; \
|
echo "Please run 'make setup-whisper' first to clone the repository."; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
@cd batteries/whisper.cpp && make tiny.en
|
@cd batteries/whisper.cpp && make large-v3-turbo
|
||||||
@echo "Creating symlink to Whisper model..."
|
|
||||||
@ln -sf batteries/whisper.cpp/models/ggml-tiny.en.bin ./ggml-model.bin
|
|
||||||
@echo "Whisper model downloaded successfully!"
|
@echo "Whisper model downloaded successfully!"
|
||||||
|
|
||||||
# Docker targets for STT/TTS services (in batteries directory)
|
# Docker targets for STT/TTS services (in batteries directory)
|
||||||
|
|||||||
@@ -6,16 +6,16 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "8081:8081"
|
- "8081:8081"
|
||||||
volumes:
|
volumes:
|
||||||
- ./models:/app/models
|
- ./whisper.cpp/models:/app/models
|
||||||
- ./audio:/app/audio
|
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
entrypoint: ""
|
entrypoint: ""
|
||||||
command: ["./build/bin/whisper-server", "-m", "/app/models/ggml-large-v3-turbo-q5_0", "-t", "4", "-p", "1", "--port", "8081", "--host", "0.0.0.0"]
|
command: ["./build/bin/whisper-server", "-m", "/app/models/ggml-large-v3-turbo.bin", "-t", "4", "-p", "1", "--port", "8081", "--host", "0.0.0.0"]
|
||||||
environment:
|
environment:
|
||||||
- WHISPER_LOG_LEVEL=3
|
- WHISPER_LOG_LEVEL=3
|
||||||
# Restart policy in case the service fails
|
# Restart policy in case the service fails
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
|
|
||||||
# Kokoro-FastAPI TTS service
|
# Kokoro-FastAPI TTS service
|
||||||
kokoro-tts:
|
kokoro-tts:
|
||||||
# image: ghcr.io/remsky/kokoro-fastapi-cpu:latest
|
# image: ghcr.io/remsky/kokoro-fastapi-cpu:latest
|
||||||
|
|||||||
1
batteries/whisper.cpp
Submodule
1
batteries/whisper.cpp
Submodule
Submodule batteries/whisper.cpp added at a88b93f85f
@@ -31,8 +31,8 @@ TTS_SPEED = 1.0
|
|||||||
STT_ENABLED = false
|
STT_ENABLED = false
|
||||||
STT_TYPE = "WHISPER_SERVER" # WHISPER_SERVER or WHISPER_BINARY
|
STT_TYPE = "WHISPER_SERVER" # WHISPER_SERVER or WHISPER_BINARY
|
||||||
STT_URL = "http://localhost:8081/inference"
|
STT_URL = "http://localhost:8081/inference"
|
||||||
WhisperBinaryPath = "./whisper-cli" # Path to whisper binary (for WHISPER_BINARY mode)
|
WhisperBinaryPath = "./batteries/whisper.cpp/whisper-cli" # Path to whisper binary (for WHISPER_BINARY mode)
|
||||||
WhisperModelPath = "./ggml-model.bin" # Path to whisper model file (for WHISPER_BINARY mode)
|
WhisperModelPath = "./batteries/whisper.cpp/ggml-model.bin" # Path to whisper model file (for WHISPER_BINARY mode)
|
||||||
STT_LANG = "en" # Language for speech recognition (for WHISPER_BINARY mode)
|
STT_LANG = "en" # Language for speech recognition (for WHISPER_BINARY mode)
|
||||||
STT_SR = 16000 # Sample rate for audio recording
|
STT_SR = 16000 # Sample rate for audio recording
|
||||||
DBPATH = "gflt.db"
|
DBPATH = "gflt.db"
|
||||||
|
|||||||
Reference in New Issue
Block a user