We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2708965 commit 1909efbCopy full SHA for 1909efb
whispercpppy/server.py
@@ -109,7 +109,7 @@ def is_video_file(path: Path) -> bool:
109
return path.suffix.lower() in VIDEO_EXT
110
111
112
-def convert_video_to_audio(path: Path) -> Path:
+def video_to_mono16k_wav(path: Path) -> Path:
113
fd, temp_path = tempfile.mkstemp(suffix=".wav")
114
os.close(fd)
115
audio_path = Path(temp_path)
@@ -332,7 +332,7 @@ def inference(
332
upload_path = file
333
temp_audio_path: Path | None = None
334
if is_video_file(file):
335
- temp_audio_path = convert_video_to_audio(file)
+ temp_audio_path = video_to_mono16k_wav(file)
336
upload_path = temp_audio_path
337
338
try:
0 commit comments