Skip to content

Commit

Permalink
Update NeMo ASR resolver (huggingface#126)
Browse files Browse the repository at this point in the history
* Update ASR resolver

* Correct method
  • Loading branch information
titu1994 authored May 2, 2022
1 parent d13a2a5 commit ee1631e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions js/src/lib/interfaces/Libraries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,7 @@ const nemoDomainResolver = (domain: string, model: ModelData): string | undefine
switch (domain) {
case "ASR":
return `import nemo.collections.asr as nemo_asr
from huggingface_hub import hf_hub_download
path = hf_hub_download(repo_id="${model.id}", filename="${modelName}")
asr_model = nemo_asr.models.ASRModel.restore_from(path)
asr_model = nemo_asr.models.ASRModel.from_pretrained("${model.id}")
transcriptions = asr_model.transcribe(["file.wav"])`;
default:
Expand Down

0 comments on commit ee1631e

Please sign in to comment.