canary-0.7b-ko / infer.py
lee1jun's picture
Upload folder using huggingface_hub
0568f54 verified
raw
history blame contribute delete
490 Bytes
import nemo.collections.asr as nemo_asr
asr_model = nemo_asr.models.ASRModel.from_pretrained("lee1jun/canary-0.7b-ko")
# Configure transcription parameters in sample.json
# {"audio_filepath": "audio1.wav", "pnc": "True", "itn": "True", "lang": "ko", "source_lang": "ko", "target_lang": "ko"}
# {"audio_filepath": "audio2.wav", "pnc": "True", "itn": "False", "lang": "ko", "source_lang": "ko", "target_lang": "ko"}
transcriptions = asr_model.transcribe("sample.json")
print(transcriptions)