Skip to content

Commit 1909efb

Browse files
committed
update
1 parent 2708965 commit 1909efb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

whispercpppy/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def is_video_file(path: Path) -> bool:
109109
return path.suffix.lower() in VIDEO_EXT
110110

111111

112-
def convert_video_to_audio(path: Path) -> Path:
112+
def video_to_mono16k_wav(path: Path) -> Path:
113113
fd, temp_path = tempfile.mkstemp(suffix=".wav")
114114
os.close(fd)
115115
audio_path = Path(temp_path)
@@ -332,7 +332,7 @@ def inference(
332332
upload_path = file
333333
temp_audio_path: Path | None = None
334334
if is_video_file(file):
335-
temp_audio_path = convert_video_to_audio(file)
335+
temp_audio_path = video_to_mono16k_wav(file)
336336
upload_path = temp_audio_path
337337

338338
try:

0 commit comments

Comments
 (0)