-
I am following https://jaimeleal.github.io/how-to-speech-synthesis to create a voice synthesis dataset. The tutorial uses Amazon Transcribe and outputs a JSON and the JSON files are then use to create a metadata.csv and filelists. My question: How can I output a JSON file directly from Whisper? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
If you are using the command line, you can edit import json
...
# (after line 303)
# save JSON
with open(os.path.join(output_dir, audio_basename + ".json"), "w", encoding="utf-8") as f:
json.dump(result, f) |
Beta Was this translation helpful? Give feedback.
-
How should one proceed with the already output .txt, .SRT and .vtt files? Ideally, you would not transcribe all the audio files again (couple of thousands) to generate JSON files. There are suggestions at https://stackoverflow.com/questions/11265575/converting-text-to-json/11265677 using Gelatin, Java or Go. |
Beta Was this translation helpful? Give feedback.
If you are using the command line, you can edit
transcribe.py
to add something like: