fixed error
This commit is contained in:
@ -122,13 +122,13 @@ async def get_waveform_audio(request: Request, path: str = Query(...)):
|
||||
tmp_dir = tempfile.mkdtemp(prefix="talkedit_waveform_")
|
||||
out_wav = Path(tmp_dir) / f"{cache_key}.wav"
|
||||
|
||||
# Downsample to mono 22050 Hz — enough for waveform drawing, small file
|
||||
# Downsample to mono 8000 Hz — enough for waveform drawing and much smaller payloads
|
||||
cmd = [
|
||||
"ffmpeg", "-y",
|
||||
"-i", str(file_path),
|
||||
"-vn", # drop video
|
||||
"-ac", "1", # mono
|
||||
"-ar", "22050", # 22 kHz sample rate
|
||||
"-ar", "8000", # 8 kHz sample rate
|
||||
"-acodec", "pcm_s16le", # 16-bit PCM WAV
|
||||
str(out_wav),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user