1

I'm trying hard to decode some stereo WAV audio files encoded in g729 8000Hz 17448bits into ANY playable format. I'm passing those audios into a Speech Recognition code I made in Python, and they don't work with the code. When I try to play using VLC, Groove or Windows Media Player, still not working.

I've tried to convert them using command line ffmpeg commands like this one:

ffmpeg -f g729 -i input.WAV -ac 2 output.WAV

and the result is actually playable, but only NOISE can be heard instead of expected voices.

Since ffmpeg does have support for decoding g729 files, I'm thinking there is something I could be missing when using ffmpeg commands...

The files aren't corrupted, in fact they are constantly played using a SaaS by my co-workers.

Thanks in advance for any help!

EDIT:

Here goes the log printed by ffmpeg when running the command highlighted above:

(base) C:\Users\soare\Desktop>ffmpeg -f g729 -i f.WAV -ac 2 output.WAV
ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 9.2.1 (GCC) 20200122
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[g729 @ 00000289cbca05c0] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, g729, from 'f.WAV':
  Duration: 00:02:34.06, start: 0.000000, bitrate: 8 kb/s
    Stream #0:0: Audio: g729, 8000 Hz, mono, s16p
File 'output.WAV' already exists. Overwrite ? [y/N] y
Stream mapping:
  Stream #0:0 -> #0:0 (g729 (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to 'output.WAV':
  Metadata:
    ISFT            : Lavf58.29.100
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 8000 Hz, stereo, s16, 256 kb/s
    Metadata:
      encoder         : Lavc58.54.100 pcm_s16le
[g729 @ 00000289cbcac140] pitch_delay_int 144 is too large
f.WAV: corrupt input packet in stream 0
size=    4814kB time=00:00:01.93 bitrate=20375.8kbits/s speed=7.22x
video:0kB audio:4814kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001582%
  • Are you sure it is actually G.729? You say the bitrate is 17448 b/s, but standard G.729 is only 8000, and G.729 extensions allow 6400 or 11800 (I do not believe 11800 is currently supported by FFmpeg). 1) Copy and paste the complete log from the command and [edit] your question to include the log. 2) Provide a link to g729 sample file if possible. – llogan Oct 15 '21 at 16:26
  • @llogan, thanks for the answer! Well, the information about being G.729 came from the Telecom department of the company I work for. I've searched for ways to check it using ffmpeg commands but had no success. On the other hand, bit and sample rates mentioned were checked using: `ffprobe -i f.WAV -v quiet -show_entries stream=bit_rate -hide_banner` and `ffprobe -i f.WAV -v quiet -show_entries stream=sample_rate -hide_banner`. I'll insert the log into the question. I'm so sorry I can't share the audio, it's private data. – Leonardo Soares Oct 19 '21 at 02:18
  • Only suggestion I can give is to try a recent ffmpeg (git essentials from gyan.dev). Although there are not a huge number of G.729 related commits the 4.2 release branch is getting old. – llogan Oct 19 '21 at 03:38

0 Answers0