#7016 Audio file could not be read as PCM WAV, AIFF/AIFF-C, or Native FLAC; check if file is corrupted or in another formatTra

2402**5081 Posted at: 2 hours ago

Audio file could not be read as PCM WAV, AIFF/AIFF-C, or Native FLAC; check if file is corrupted or in another format
Traceback (most recent call last):
File "videotrans\recognition\_base.py", line 98, in run
File "tenacity\__init__.py", line 338, in wrapped_f
File "tenacity\__init__.py", line 477, in call
File "tenacity\__init__.py", line 378, in iter
File "tenacity\__init__.py", line 421, in exc_check
tenacity.RetryError: RetryError[]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "videotrans\task\only_one.py", line 70, in run
File "videotrans\task\_stage_recogn.py", line 63, in recogn
File "videotrans\recognition\__init__.py", line 211, in run
File "videotrans\recognition\_base.py", line 105, in run
File "tenacity\__init__.py", line 480, in call
File "videotrans\recognition\_google.py", line 55, in _exec
File "speech_recognition\__init__.py", line 274, in enter
ValueError: Audio file could not be read as PCM WAV, AIFF/AIFF-C, or Native FLAC; check if file is corrupted or in another format

cfg=[TaskCfgVTT]当前工作模式: 翻译视频 单视频模式
原始输入文件名: C:/Users/Admin/Videos/Sourcevideo/Nhà tôi có nhà tắm thông tới Tam Quốc.mp4,
输出结果保存到文件夹: C:/Users/Admin/Videos/VideoTrans/Nhà tôi có nhà tắm thông tới Tam Quốc-mp4,
临时文件夹: D:/A-win-pyvideotrans-v4.11/tmp/10268/5fe70b73b3
未选 清理已存在
已启用CUDA加速
未选 降噪
STT Service:Google STT API (Free), , 发音语言: Simplified Chinese, 断句方式:默认断句
TranslateSrt:Google Translate (Free),原始语言:Simplified Chinese,目标语言:Vietnamese, 已选 SendSRT
TTS Service:gTTS(Free), 角色:gtts, 配音语言:Vietnamese, 未选 二次语音识别
音量:+8%, 语速:+4%, 已选 音频加速, 未选 视频慢速
字幕: Hard Subtitles


=
system:Windows-10-10.0.28000-SP0
version:v4.11
frozen:True
language:en
root_dir:D:/A-win-pyvideotrans-v4.11

1 Replies

#1 DeepSeek reply at 1 hour ago

The root cause is the speech_recognition library used by the Google STT API (Free) channel cannot decode the audio file passed to it. This most often happens because the source video filename contains non-ASCII characters (Vietnamese diacritics and spaces)Nhà tôi có nhà tắm thông tới Tam Quốc.mp4 — which breaks the FFmpeg audio extraction step on Windows, producing an unreadable/corrupt audio file.

Fixes (in order of preference)

  1. Rename the video file to simple ASCII characters with no spaces or special symbols, e.g., video.mp4, then re-import it into pyVideoTrans.

    • This is the most reliable fix. The software's underlying tools (FFmpeg, speech_recognition) have poor compatibility with non-ASCII paths on Windows.
  2. Switch the recognition channel to faster-whisper(内置) (default recommended). It handles audio extraction internally and is far more robust than the Google STT API channel. Note:

    • Google STT API (Free) is only usable if you have a working VPN/proxy in mainland China.
    • CUDA acceleration has no effect on Google STT API since it's an online service; CUDA only benefits local models like faster-whisper.
  3. If you still need the Google STT channel, make sure:

    • Your network proxy is configured correctly in the Alignment row's proxy field (e.g., http://127.0.0.1:10808) and the proxy service is running.
    • The file path on disk actually exists and is readable.

After renaming, clear the generated cache by checking 清理已生成 on the main interface before re-running, to ensure a fresh extraction.

请查阅相关文档:

If the issue persists after renaming, please provide the latest log file from the logs/ folder (copy the last ~30 lines of error info).

Thinking...
Post Your Reply
If you have more than 50 messages, you will no longer receive an automatic reply. Please ask a new question!
Open source and free maintenance is not easy. If this project is helpful to you, please consider making a small donation to help the project continue to maintain and update.

Dondate via ko-fi.com

Related resource