Skip to content

Commit

Permalink
Add fine-tuned whisper on aishell.
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Jan 30, 2024
1 parent 0b18ccf commit 2e6535a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions scripts/whisper/export-onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def get_args():
"small", "small.en", "medium", "medium.en",
"large", "large-v1", "large-v2",
"distil-medium.en", "distil-small.en", "distil-large-v2"
# for fine-tuned models from icefall
"medium-aishell",
],
# fmt: on
)
Expand Down Expand Up @@ -340,6 +342,19 @@ def main():
"""
)
model = whisper.load_model(filename)
elif name == "medium-aishell":
filename = "./medium-aishell.pt"
if not Path(filename).is_file():
raise ValueError(
"""
Please go to https://huggingface.co/yuekai/icefall_asr_aishell_whisper/tree/main/exp_medium
to download epoch-10-avg-4.pt
You can use the following command to do that:
wget -O medium-aishell.pt https://huggingface.co/yuekai/icefall_asr_aishell_whisper/resolve/main/exp_medium/epoch-10-avg-4.pt
"""
)
model = whisper.load_model(filename)
else:
model = whisper.load_model(name)
print(model.dims)
Expand Down

0 comments on commit 2e6535a

Please sign in to comment.