File size: 655 Bytes
b2cbfae
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash

# We use the model from
# https://huggingface.co/ezerhouni/icefall-librispeech-rnn-lm/tree/main
# as an example

export CUDA_VISIBLE_DEVICES=

if [ ! -f ./icefall-librispeech-rnn-lm/exp/pretrained.pt ]; then
  GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/ezerhouni/icefall-librispeech-rnn-lm
  pushd icefall-librispeech-rnn-lm/exp
  git lfs pull --include "pretrained.pt"
  ln -s pretrained.pt epoch-99.pt
  popd
fi

python3 ./export-onnx.py \
  --exp-dir ./icefall-librispeech-rnn-lm/exp \
  --epoch 99 \
  --avg 1 \
  --vocab-size 500 \
  --embedding-dim 2048 \
  --hidden-dim 2048 \
  --num-layers 3 \
  --tie-weights 1