csukuangfj commited on
Commit
11788ff
1 Parent(s): a275607

add models

Browse files
Files changed (4) hide show
  1. export-onnx.py +3 -1
  2. model.int8.onnx +2 -2
  3. model.onnx +2 -2
  4. run.sh +11 -4
export-onnx.py CHANGED
@@ -105,12 +105,14 @@ def main():
105
  license_url = (
106
  "https://huggingface.co/pyannote/segmentation-3.0/blob/main/LICENSE"
107
  )
 
108
  else:
109
  url_1 = "https://huggingface.co/Revai/reverb-diarization-v1"
110
  url_2 = "https://huggingface.co/csukuangfj/sherpa-onnx-reverb-diarization-v1"
111
  license_url = (
112
  "https://huggingface.co/Revai/reverb-diarization-v1/blob/main/LICENSE"
113
  )
 
114
 
115
  meta_data = {
116
  "num_speakers": len(model.specifications.classes),
@@ -122,7 +124,7 @@ def main():
122
  "receptive_field_shift": receptive_field_shift,
123
  "model_type": "pyannote-segmentation-3.0",
124
  "version": "1",
125
- "model_author": "pyannote",
126
  "maintainer": "k2-fsa",
127
  "url_1": url_1,
128
  "url_2": url_2,
 
105
  license_url = (
106
  "https://huggingface.co/pyannote/segmentation-3.0/blob/main/LICENSE"
107
  )
108
+ model_author = "pyannote-audio"
109
  else:
110
  url_1 = "https://huggingface.co/Revai/reverb-diarization-v1"
111
  url_2 = "https://huggingface.co/csukuangfj/sherpa-onnx-reverb-diarization-v1"
112
  license_url = (
113
  "https://huggingface.co/Revai/reverb-diarization-v1/blob/main/LICENSE"
114
  )
115
+ model_author = "Revai"
116
 
117
  meta_data = {
118
  "num_speakers": len(model.specifications.classes),
 
124
  "receptive_field_shift": receptive_field_shift,
125
  "model_type": "pyannote-segmentation-3.0",
126
  "version": "1",
127
+ "model_author": model_author,
128
  "maintainer": "k2-fsa",
129
  "url_1": url_1,
130
  "url_2": url_2,
model.int8.onnx CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:eba77d4d983fd37d8cc0864b10b63bcd0c1864633b2917fb0d2aeb4b6055cf23
3
- size 2415969
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cd4576325e0703478da874105ac2de53180cd6220b608074281c19f849535f52
3
+ size 2415966
model.onnx CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:08a5eb1dff82847656baa7bf022c85bd9c90dd5a6a1f1b06f3ebfca0482beb5a
3
- size 9512160
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c1b1628a86d12ea9837c2feb0eab3b08ba95111670813d26f09b75b6dbb7540b
3
+ size 9512157
run.sh CHANGED
@@ -3,13 +3,19 @@
3
 
4
  export SHERPA_ONNX_IS_REVAI=1
5
 
 
 
 
 
6
  set -ex
7
  function install_pyannote() {
8
- pip install pyannote.audio onnx onnxruntime
9
  }
10
 
11
  function download_test_files() {
12
- curl -SL -O https://huggingface.co/Revai/reverb-diarization-v1/resolve/main/pytorch_model.bin
 
 
13
  curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/lei-jun-test.wav
14
  }
15
 
@@ -28,13 +34,14 @@ echo "----------onnx model.onnx----------"
28
  echo "----------onnx model.int8.onnx----------"
29
  ./vad-onnx.py --model ./model.int8.onnx --wav ./lei-jun-test.wav
30
 
31
- curl -SL -O https://huggingface.co/Revai/reverb-diarization-v1/resolve/main/LICENSE
 
32
 
33
  cat >README.md << EOF
34
  # Introduction
35
 
36
  Models in this file are converted from
37
- https://huggingface.co/Revai/reverb-diarization-v1/tree/main
38
 
39
  Note that it is accessible under a non-commercial license.
40
 
 
3
 
4
  export SHERPA_ONNX_IS_REVAI=1
5
 
6
+ if [ -z $VERSION ]; then
7
+ VERSION=v1
8
+ fi
9
+
10
  set -ex
11
  function install_pyannote() {
12
+ pip install pyannote.audio onnx onnxruntime numpy==1.26.4
13
  }
14
 
15
  function download_test_files() {
16
+ # curl -SL -O https://huggingface.co/Revai/reverb-diarization-$VERSION/resolve/main/pytorch_model.bin
17
+
18
+ curl -SL -O https://huggingface.co/openspeech/revai-models/resolve/main/$VERSION/pytorch_model.bin
19
  curl -SL -O https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/lei-jun-test.wav
20
  }
21
 
 
34
  echo "----------onnx model.int8.onnx----------"
35
  ./vad-onnx.py --model ./model.int8.onnx --wav ./lei-jun-test.wav
36
 
37
+ # curl -SL -O https://huggingface.co/Revai/reverb-diarization-$VERSION/resolve/main/LICENSE
38
+ curl -SL -O https://huggingface.co/openspeech/revai-models/resolve/main/v1/LICENSE
39
 
40
  cat >README.md << EOF
41
  # Introduction
42
 
43
  Models in this file are converted from
44
+ https://huggingface.co/Revai/reverb-diarization-$VERSION/tree/main
45
 
46
  Note that it is accessible under a non-commercial license.
47