| | |
| | | text = rich_transcription_postprocess(res[0]["text"]) |
| | | print(text) |
| | | |
| | | # en with timestamp |
| | | res = model.generate( |
| | | input=f"{model.model_path}/example/en.mp3", |
| | | cache={}, |
| | | language="auto", # "zn", "en", "yue", "ja", "ko", "nospeech" |
| | | use_itn=True, |
| | | batch_size_s=60, |
| | | merge_vad=True, # |
| | | merge_length_s=15, |
| | | output_timestamp=True, |
| | | ) |
| | | print(res) |
| | | text = rich_transcription_postprocess(res[0]["text"]) |
| | | print(text) |
| | | |
| | | # zh |
| | | res = model.generate( |
| | | input=f"{model.model_path}/example/zh.mp3", |
| | |
| | | text = rich_transcription_postprocess(res[0]["text"]) |
| | | print(text) |
| | | |
| | | # zh with timestamp |
| | | res = model.generate( |
| | | input=f"{model.model_path}/example/zh.mp3", |
| | | cache={}, |
| | | language="auto", # "zn", "en", "yue", "ja", "ko", "nospeech" |
| | | use_itn=True, |
| | | batch_size_s=60, |
| | | merge_vad=True, # |
| | | merge_length_s=15, |
| | | output_timestamp=True, |
| | | ) |
| | | print(res) |
| | | text = rich_transcription_postprocess(res[0]["text"]) |
| | | print(text) |
| | | |
| | | # yue |
| | | res = model.generate( |
| | | input=f"{model.model_path}/example/yue.mp3", |