I am wanting to train a neural network to see how it performs at
decoding the mp3 stream.
In order to do this, I would like to have the bitstream frame by frame
and the audio PCM frame by frame.
I have modified lame to try to extract frame data and audio PCM data
frame by frame.
To create a row I simply write "\n" to file which indicates the start of
the next frame's row.
When I run this code using an mp3 file like so :
~/temp/lame/frontend/lame -q --cbr -b 192 -c --tt "15.Awareness" --ta
"Flatmax, Rob J" --tl "Wideband Cold Fusion" --ty 2008 --tc
flatmaxstudios.com --tn 15 "15.Awareness.8k.wav" "15.Awareness.mp3"
I get bits.txt with 2537 frames
I get pcm.txt with 2147 frames.
The encoder reports 2149 frames.
Is there any way to change where I print "\n" to file to ensure that
whole frames are written per row in the bitsream (bits.txt) file ?
I think they should both have around 2149 frames ... the PCM data is
close, but the bitstream data is far off.