File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ fn main() {
1212 let model = "./sherpa-onnx-zipformer-audio-tagging-2024-04-09/model.int8.onnx" ;
1313 let labels_path = "./sherpa-onnx-zipformer-audio-tagging-2024-04-09/class_labels_indices.csv" ;
1414 let wav_path = "./sherpa-onnx-zipformer-audio-tagging-2024-04-09/test_wavs/1.wav" ;
15+ let top_k = 5 ;
1516
1617 let reader = hound:: WavReader :: open ( & wav_path) . expect ( "Failed to open WAV file" ) ;
1718 let spec = reader. spec ( ) ;
@@ -24,7 +25,7 @@ fn main() {
2425 let config = sherpa_rs:: audio_tag:: AudioTagConfig {
2526 model : model. into ( ) ,
2627 labels : labels_path. into ( ) ,
27- top_k : 5 ,
28+ top_k,
2829 ..Default :: default ( )
2930 } ;
3031 let mut audio_tag = sherpa_rs:: audio_tag:: AudioTag :: new ( config) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments