我正在使用 Google Speech to Text API 将 WAV 文件转换为文本。当我播放 WAV 文件时,它工作正常,但是当我运行 Google Speech To Text API 时,我收到此错误:
WAV header indicates an unsupported format.
当我尝试使用ffmpeg
工具分析文件时,出现以下错误:
Output #0, wav, to '/home/shubham/workspace/intent-service/scripts/audio2.tmp.wav':
Metadata:
ISFT : Lavf57.83.100
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, mono, s16, 128 kb/s
Metadata:
encoder : Lavc57.107.100 pcm_s16le
[gsm_ms @ 0x55d4c255cd20] Packet is too small
Error while decoding stream #0:0: Invalid data found when processing input size=7924kB time=00:08:27.16 bitrate= 128.0kbits/s speed=3.72e+03x
video:0kB audio:7924kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000961%
我错过了什么?