I have a .txt file containing samples from my microphone with ADPCM encoding. I am confused on how to convert the txt file to a .RAW file or if its even needed. What format does the .txt file have to be to successfully import as “RAW data” into audacity? The audio that is being sampled is at 8bits, 8kHz.
The uploaded file contains the format that the .txt file is currently in. This format did not work when I imported the .txt file under " file → Import → RAW data" as I only heard seemingly random noise.
Would a conversion to a .RAW file be needed? and how would I go about doing so?
2kHz.txt (57.5 KB)
“Import Raw” is for importing “audio data”, not for importing “text data”. It IS possible to import a text file as “Raw”, but the result will almost certainly be just noise as text data is not audio.
It is possible to export sample values from an audio file as text (number values), and to import number values from a text file as audio using these two plug-ins:
Note that the numbers should normally be in the range +/- 1.0 (linear scale), and the audio encoding is linear PCM.
How did you make that?
Thank you for your response!
The audio is produced by an on board mic in a thunderboard sense where the mic data in encoded into an ADPCM format. This data is then sent to a raspberry pi 3 via BLE and streamed into a text file as in the first post.
The reason why I want to encode it is because of the limited baud rate of 115200. If I do not encode it I am unable to send higher resolution audio.
The second link you have mentioned converts PCM data in a txt file to audio data, is there a way to do this for an ADPCM encoded txt file?
I’m not aware of any existing program or plug-in that does that.
There are multiple types of ADPCM, and they are all different (not cross-compatible).
These types include:
and several others.
So you have a program that converts single bytes into decimal numbers in the range 0 to 255, which are then written to a text file?
Why do you need the data as text, and why do you then need to convert the text back to audio?