mirror of
https://github.com/chidiwilliams/buzz.git
synced 2026-03-14 14:45:46 +01:00
Fix for whisper server language detection (#1198)
This commit is contained in:
parent
86e7051123
commit
261e532818
2 changed files with 8 additions and 4 deletions
|
|
@ -24,11 +24,13 @@ class LocalWhisperCppServerTranscriber(OpenAIWhisperAPIFileTranscriber):
|
|||
os.path.join(APP_BASE_DIR, "whisper-server.exe"),
|
||||
"--port", "3000",
|
||||
"--inference-path", "/audio/transcriptions",
|
||||
"--threads", str(os.getenv("BUZZ_WHISPERCPP_N_THREADS", (os.cpu_count() or 8)//2)),
|
||||
"--language", task.transcription_options.language,
|
||||
"--threads", str(os.getenv("BUZZ_WHISPERCPP_N_THREADS", (os.cpu_count() or 8) // 2)),
|
||||
"--model", task.model_path
|
||||
]
|
||||
|
||||
if task.transcription_options.language is not None:
|
||||
command.extend(["--language", task.transcription_options.language])
|
||||
|
||||
logging.debug(f"Starting Whisper server with command: {' '.join(command)}")
|
||||
|
||||
self.process = subprocess.Popen(
|
||||
|
|
|
|||
|
|
@ -353,13 +353,15 @@ class RecordingTranscriber(QObject):
|
|||
os.path.join(APP_BASE_DIR, "whisper-server.exe"),
|
||||
"--port", "3004",
|
||||
"--inference-path", "/audio/transcriptions",
|
||||
"--threads", str(os.getenv("BUZZ_WHISPERCPP_N_THREADS", (os.cpu_count() or 8)//2)),
|
||||
"--language", self.transcription_options.language,
|
||||
"--threads", str(os.getenv("BUZZ_WHISPERCPP_N_THREADS", (os.cpu_count() or 8) // 2)),
|
||||
"--model", self.model_path,
|
||||
"--no-timestamps",
|
||||
"--no-context", # on Windows context causes duplications of last message
|
||||
]
|
||||
|
||||
if self.transcription_options.language is not None:
|
||||
command.extend(["--language", self.transcription_options.language])
|
||||
|
||||
logging.debug(f"Starting Whisper server with command: {' '.join(command)}")
|
||||
|
||||
self.process = subprocess.Popen(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue