[FFmpeg-user] Convert audio to CSV

Bouke / edit 'B bouke at editb.nl
Sun Jun 30 16:11:05 EEST 2024



> On 30 Jun 2024, at 14:43, Michael Koch <astroelectronic at t-online.de> wrote:
> 
> Am 30.06.2024 um 14:22 schrieb Media Mouth:
>> 
>>>> Which microcontroller are you using?
>>> Either Teensy LC or Seeed Xiao SAMD21. They both have a built-in DAC.
>>> In the meantime I found that "Sonic Visualiser" can open WAV and export CSV.
>>> 
>>> Michael
>> I'm not familiar with those but it Teensy does seem to have an optional filesystem akin to the one avail on the esp32
> 
> I know, but inserting the waveform into the C source code is much easier. My microcontroller boards don't have SD cards.
> The problem is already solved. Preprocessing is done with FFmpeg (load the audio file, cut out a segment and change the sample rate), then Sonic Visualiser is used for conversion to CSV, then Libre Office for removing the first column from the CSV file (I don't need the sample number). Then copy-and-paste to the C source.

Pfff, what a work…
I take it you only have to do this once?

Why LibreOffice? (Seems like a sledgehammer, you can open a CSV with ‘any’ simple text editor.

And if you are stripping the header, it looks like you don’t need CSV, but just a plain simple string with a delim between values...

(I could do this in Python without any Wave or CSV module, almost faster than reading this thread. If you speak C, is C that difficult you could not have done it yourself there?)

But what we all want to know (since we’re all guys that like ‘press button here, light goes on there'), what are you making?


Bouke

> 
> Michael
> 
> 



More information about the ffmpeg-user mailing list