I run the DeepSpeech command for wav to text and want to save the result into a text file like so:
deepspeech --model path/to/model --audio path/to/audio >> path/to/result.txt
It works in the terminal but if I try to run it as a subprocess in Python like that:
subprocess.run(["deepspeech", "--model", "path/to/model", "--audio", "path/to/audio", ">>", "path/to/result.txt"])
I get this:
usage: deepspeech [-h] --model MODEL [--lm [LM]] [--trie [TRIE]] --audio AUDIO
[--beam_width BEAM_WIDTH] [--lm_alpha LM_ALPHA]
[--lm_beta LM_BETA] [--version] [--extended] [--json]
deepspeech: error: unrecognized arguments: >> path/to/result.txt
Is there a fix for that?