File size: 1,470 Bytes
5ec554b
 
 
a275607
 
11788ff
 
 
 
5ec554b
 
11788ff
5ec554b
 
 
11788ff
 
 
5ec554b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11788ff
 
5ec554b
 
 
 
 
11788ff
5ec554b
 
 
 
 
 
 
 
 
 
 
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env bash
# Copyright    2024  Xiaomi Corp.        (authors: Fangjun Kuang)

export SHERPA_ONNX_IS_REVAI=1

if [ -z $VERSION ]; then
  VERSION=v1
fi

set -ex
function install_pyannote() {
  pip install pyannote.audio onnx onnxruntime numpy==1.26.4
}

function download_test_files() {
  # curl -SL -O https://huggingface.co/Revai/reverb-diarization-$VERSION/resolve/main/pytorch_model.bin

  curl -SL -O https://huggingface.co/openspeech/revai-models/resolve/main/$VERSION/pytorch_model.bin
  curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/lei-jun-test.wav
}

install_pyannote
download_test_files

./export-onnx.py
./preprocess.sh

echo "----------torch----------"
./vad-torch.py

echo "----------onnx model.onnx----------"
./vad-onnx.py --model ./model.onnx --wav ./lei-jun-test.wav

echo "----------onnx model.int8.onnx----------"
./vad-onnx.py --model ./model.int8.onnx --wav ./lei-jun-test.wav

# curl -SL -O https://huggingface.co/Revai/reverb-diarization-$VERSION/resolve/main/LICENSE
curl -SL -O https://huggingface.co/openspeech/revai-models/resolve/main/v1/LICENSE

cat >README.md << EOF
# Introduction

Models in this file are converted from
https://huggingface.co/Revai/reverb-diarization-$VERSION/tree/main

Note that it is accessible under a non-commercial license.

Please see ./LICENSE for details.

See also
https://www.rev.com/blog/speech-to-text-technology/introducing-reverb-open-source-asr-diarization

EOF