thelou1s commited on
Commit
400bffb
1 Parent(s): aef02a5

add test.py

Browse files
Files changed (1) hide show
  1. test.py +8 -0
test.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+
3
+ classifier = pipeline(model="superb/wav2vec2-base-superb-ks")
4
+ res = classifier("~/Downloads/1.flac")
5
+ #res = classifier("https://huggingface.co/datasets/Narsil/asr_dummy/resolve/main/1.flac")
6
+
7
+ print(str(res))
8
+ #[{'score': 0.997, 'label': '_unknown_'}, {'score': 0.002, 'label': 'left'}, {'score': 0.0, 'label': 'yes'}, {'score': 0.0, 'label': 'down'}, {'score': 0.0, 'label': 'stop'}]