I need to convert a WAV file to CSV file using a python script. I found on the internet a python package called wav2vec which converts the .wav file into a vector graphics file with a CSV formatter option.
When I load the wav2vec package into the terminal an then write directly the instructions I get the CSV file, but when I try to put it into a script and try to run it, I allways get a syntax error (invalid syntax)
Since a month ago I started programming with python, and when I saved "terminal instructions" or orders into a python script to later run it, I didn't have any problem. Is there any mistake that I'm missing?
First, I run my script with just the line "Import wav2vec"
Then, I go to the terminal and write:
wav2vec Maincra.wav --format CSV --width 1 --height 0 > Maincra.csv
Looking like this:
PS C:\Users\joker\OneDrive\Universidad\Proyecto Procesamiento de señales\Código> wav2vec Maincra.wav --format CSV --width 1 --height 0 > Maincra.csv
and it works! But when I try to put it all in the same script (in order to just press F5 and run everything), I get this error:
File "c:\Users\joker\OneDrive\Universidad\Proyecto Procesamiento de señales\Código\Testwavtocsv.py", line 6
wav2vec Maincra.wav --format CSV --width 1 --height 0 > Maincra.csv
^
SyntaxError: invalid syntax
I don't know what to do to fix that, I have tried to write it in every possible way.