Add pipeline tag, library name, and usage instructions

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +36 -11
README.md CHANGED
@@ -1,18 +1,49 @@
1
  ---
 
 
 
 
 
2
  tags:
3
  - espnet
4
  - audio
5
  - classification
6
- datasets:
7
- - as20k
8
- license: cc-by-4.0
9
  ---
10
 
11
  ## ESPnet2 CLS model
12
 
13
  ### `espnet/OpenBEATS-Large-i2-as20k`
14
 
15
- This model was trained by Shikhar Bharadwaj using as20k recipe in [espnet](https://github.com/espnet/espnet/).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  ## CLS config
18
 
@@ -774,10 +805,4 @@ task: cls
774
  doi={10.21437/Interspeech.2018-1456},
775
  url={http://dx.doi.org/10.21437/Interspeech.2018-1456}
776
  }
777
-
778
-
779
-
780
-
781
-
782
-
783
- ```
 
1
  ---
2
+ datasets:
3
+ - as20k
4
+ license: cc-by-4.0
5
+ library_name: espnet
6
+ pipeline_tag: audio-classification
7
  tags:
8
  - espnet
9
  - audio
10
  - classification
 
 
 
11
  ---
12
 
13
  ## ESPnet2 CLS model
14
 
15
  ### `espnet/OpenBEATS-Large-i2-as20k`
16
 
17
+ This model was trained by Shikhar Bharadwaj using as20k recipe in [espnet](https://github.com/espnet/espnet/). It is presented in the paper [OpenBEATs: A Fully Open-Source General-Purpose Audio Encoder](https://huggingface.co/papers/2507.14129).
18
+
19
+ - **GitHub Repository:** [Shikhar-S/OpenBEATs](https://github.com/Shikhar-S/OpenBEATs)
20
+ - **Paper:** [OpenBEATs: A Fully Open-Source General-Purpose Audio Encoder](https://huggingface.co/papers/2507.14129)
21
+
22
+ ## Python Usage
23
+
24
+ You can use this model via the `openbeats` library:
25
+
26
+ ```bash
27
+ pip install openbeats
28
+ ```
29
+
30
+ ```python
31
+ from openbeats.model import OpenBeats
32
+ from openbeats.utils import load_audio
33
+
34
+ # load model
35
+ model = OpenBeats.from_pretrained("espnet/OpenBEATS-Large-i2-as20k", device="cuda")
36
+
37
+ # from a file with any sample rate
38
+ out = model.encode_file("audio.wav") # pass chunk_seconds=10 for long audio
39
+
40
+ # or load the waveform in 16khz monoaural array with values in [-1,1]
41
+ wav, sr = load_audio("audio.wav")
42
+ # and pass it
43
+ out = model.encode(wav, sr)
44
+
45
+ print(out["patch_embeddings"].shape) # (num_patches, 1024)
46
+ ```
47
 
48
  ## CLS config
49
 
 
805
  doi={10.21437/Interspeech.2018-1456},
806
  url={http://dx.doi.org/10.21437/Interspeech.2018-1456}
807
  }
808
+ ```