cjpais commited on
Commit
fa1a3f8
·
verified ·
1 Parent(s): 470a579

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,9 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ SenseVoiceSmall-F16.gguf filter=lfs diff=lfs merge=lfs -text
37
+ SenseVoiceSmall-F32.gguf filter=lfs diff=lfs merge=lfs -text
38
+ SenseVoiceSmall-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
39
+ SenseVoiceSmall-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
40
+ SenseVoiceSmall-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
41
+ SenseVoiceSmall-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,315 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ base_model: FunAudioLLM/SenseVoiceSmall
4
+ base_model_relation: quantized
5
+ library_name: transcribe.cpp
6
+ pipeline_tag: automatic-speech-recognition
7
+ language:
8
+ - zh
9
+ - yue
10
+ - en
11
+ - ja
12
+ - ko
13
+ tags:
14
+ - gguf
15
+ - transcribe.cpp
16
+ - asr
17
+ - speech-to-text
18
+ - sensevoice
19
+ - san-m
20
+ - ctc
21
+ - multilingual
22
+ ---
23
+
24
+ # SenseVoiceSmall — transcribe.cpp GGUF
25
+
26
+ GGUF conversions of [FunAudioLLM/SenseVoiceSmall](https://huggingface.co/FunAudioLLM/SenseVoiceSmall) for use
27
+ with [transcribe.cpp](https://github.com/handy-computer/transcribe.cpp).
28
+
29
+ Ported from upstream commit
30
+ [3eb3b4eeffc2f2dde6051b853983753db33e35c3](https://huggingface.co/FunAudioLLM/SenseVoiceSmall/commit/3eb3b4eeffc2f2dde6051b853983753db33e35c3),
31
+ pinned 2026-05-06.
32
+ Validated against the FunASR reference at transcribe.cpp commit
33
+ [f094d28](https://github.com/handy-computer/transcribe.cpp/tree/f094d28)
34
+ on 2026-05-06.
35
+
36
+ Offline multilingual speech-to-text in Chinese, Cantonese, English, Japanese,
37
+ and Korean. A 234M-parameter SAN-M encoder with a single CTC head over a
38
+ 25,055-token SentencePiece vocabulary. Takes a 16 kHz mono WAV (capped at
39
+ 30 seconds per call, per upstream's direct-inference contract) and produces
40
+ a transcript. Not a streaming model, no translation, no built-in long-form
41
+ chunking. The same CTC head also emits language-ID, simple emotion labels,
42
+ audio-event tags, and an inverse-text-normalization flag — opt-in via
43
+ `--raw-tokens` and `--itn`.
44
+
45
+
46
+ ## Downloads
47
+
48
+ | Quantization | Download | Size | WER (LibriSpeech test-clean) |
49
+ | --- | --- | ---: | ---: |
50
+ | F32 | [SenseVoiceSmall-F32.gguf](https://huggingface.co/handy-computer/SenseVoiceSmall-gguf/resolve/main/SenseVoiceSmall-F32.gguf) | 893 MB | 3.13% |
51
+ | F16 | [SenseVoiceSmall-F16.gguf](https://huggingface.co/handy-computer/SenseVoiceSmall-gguf/resolve/main/SenseVoiceSmall-F16.gguf) | 449 MB | 3.13% |
52
+ | Q8_0 | [SenseVoiceSmall-Q8_0.gguf](https://huggingface.co/handy-computer/SenseVoiceSmall-gguf/resolve/main/SenseVoiceSmall-Q8_0.gguf) | 241 MB | 3.13% |
53
+ | Q6_K | [SenseVoiceSmall-Q6_K.gguf](https://huggingface.co/handy-computer/SenseVoiceSmall-gguf/resolve/main/SenseVoiceSmall-Q6_K.gguf) | 187 MB | 3.14% |
54
+ | Q5_K_M | [SenseVoiceSmall-Q5_K_M.gguf](https://huggingface.co/handy-computer/SenseVoiceSmall-gguf/resolve/main/SenseVoiceSmall-Q5_K_M.gguf) | 164 MB | 3.18% |
55
+ | Q4_K_M | [SenseVoiceSmall-Q4_K_M.gguf](https://huggingface.co/handy-computer/SenseVoiceSmall-gguf/resolve/main/SenseVoiceSmall-Q4_K_M.gguf) | 139 MB | 3.45% |
56
+
57
+ WER measured on the full LibriSpeech test-clean split (2620 utterances)
58
+ with greedy CTC decoding. The publisher does not report a numerical
59
+ LibriSpeech WER (the model card publishes scores only as PNG figures), so
60
+ the gate baseline is our own FunASR 1.3.1 reference run on the same
61
+ manifest: 3.13% (95% CI [2.93%, 3.34%]). transcribe.cpp's F32 port matches
62
+ that baseline within +0.002 percentage-points. LibriSpeech is an English
63
+ benchmark; SenseVoice's strongest case is Mandarin, and AISHELL-1 (CER)
64
+ is the recommended complementary check.
65
+
66
+
67
+ ## Usage
68
+
69
+ Build transcribe.cpp from source:
70
+
71
+ ```bash
72
+ git clone git@github.com:handy-computer/transcribe.cpp.git
73
+ cd transcribe.cpp
74
+ cmake -B build && cmake --build build
75
+ ```
76
+
77
+ Run on a 16 kHz mono WAV:
78
+
79
+ ```bash
80
+ build/bin/transcribe-cli \
81
+ -m SenseVoiceSmall-Q8_0.gguf \
82
+ input.wav
83
+ ```
84
+
85
+ If your audio isn't already 16 kHz mono WAV, convert it first:
86
+
87
+ ```bash
88
+ ffmpeg -i input.mp3 -ar 16000 -ac 1 output.wav
89
+ ```
90
+
91
+ See the [transcribe.cpp model page](https://github.com/handy-computer/transcribe.cpp/blob/main/docs/models/sensevoice-small.md) for performance
92
+ numbers, numerical validation, and reproduction steps.
93
+
94
+ ## License
95
+
96
+ Inherited from the base model: **model-license (FunASR MODEL_LICENSE)**. See the
97
+ [upstream model card](https://huggingface.co/FunAudioLLM/SenseVoiceSmall) for full terms.
98
+
99
+ ---
100
+
101
+ ## Original Model Card
102
+
103
+ > The section below is reproduced from
104
+ > [FunAudioLLM/SenseVoiceSmall](https://huggingface.co/FunAudioLLM/SenseVoiceSmall) at commit
105
+ > `3eb3b4eeffc2f2dde6051b853983753db33e35c3` for offline reference. The upstream card is the
106
+ > authoritative source.
107
+
108
+ ([简体中文](./README_zh.md)|English|[日本語](./README_ja.md))
109
+
110
+
111
+ # Introduction
112
+
113
+ github [repo](https://github.com/FunAudioLLM/SenseVoice) : https://github.com/FunAudioLLM/SenseVoice
114
+
115
+ SenseVoice is a speech foundation model with multiple speech understanding capabilities, including automatic speech recognition (ASR), spoken language identification (LID), speech emotion recognition (SER), and audio event detection (AED).
116
+
117
+ <img src="image/sensevoice2.png">
118
+
119
+ [//]: # (<div align="center"><img src="image/sensevoice.png" width="700"/> </div>)
120
+
121
+ <div align="center">
122
+ <h4>
123
+ <a href="https://fun-audio-llm.github.io/"> Homepage </a>
124
+ |<a href="#What's News"> What's News </a>
125
+ |<a href="#Benchmarks"> Benchmarks </a>
126
+ |<a href="#Install"> Install </a>
127
+ |<a href="#Usage"> Usage </a>
128
+ |<a href="#Community"> Community </a>
129
+ </h4>
130
+
131
+ Model Zoo:
132
+ [modelscope](https://www.modelscope.cn/models/iic/SenseVoiceSmall), [huggingface](https://huggingface.co/FunAudioLLM/SenseVoiceSmall)
133
+
134
+ Online Demo:
135
+ [modelscope demo](https://www.modelscope.cn/studios/iic/SenseVoice), [huggingface space](https://huggingface.co/spaces/FunAudioLLM/SenseVoice)
136
+
137
+
138
+ </div>
139
+
140
+
141
+ <a name="Highligts"></a>
142
+ # Highlights 🎯
143
+ **SenseVoice** focuses on high-accuracy multilingual speech recognition, speech emotion recognition, and audio event detection.
144
+ - **Multilingual Speech Recognition:** Trained with over 400,000 hours of data, supporting more than 50 languages, the recognition performance surpasses that of the Whisper model.
145
+ - **Rich transcribe:**
146
+ - Possess excellent emotion recognition capabilities, achieving and surpassing the effectiveness of the current best emotion recognition models on test data.
147
+ - Offer sound event detection capabilities, supporting the detection of various common human-computer interaction events such as bgm, applause, laughter, crying, coughing, and sneezing.
148
+ - **Efficient Inference:** The SenseVoice-Small model utilizes a non-autoregressive end-to-end framework, leading to exceptionally low inference latency. It requires only 70ms to process 10 seconds of audio, which is 15 times faster than Whisper-Large.
149
+ - **Convenient Finetuning:** Provide convenient finetuning scripts and strategies, allowing users to easily address long-tail sample issues according to their business scenarios.
150
+ - **Service Deployment:** Offer service deployment pipeline, supporting multi-concurrent requests, with client-side languages including Python, C++, HTML, Java, and C#, among others.
151
+
152
+ <a name="What's News"></a>
153
+ # What's New 🔥
154
+ - 2024/7: Added Export Features for [ONNX](https://github.com/FunAudioLLM/SenseVoice/demo_onnx.py) and [libtorch](https://github.com/FunAudioLLM/SenseVoice/demo_libtorch.py), as well as Python Version Runtimes: [funasr-onnx-0.4.0](https://pypi.org/project/funasr-onnx/), [funasr-torch-0.1.1](https://pypi.org/project/funasr-torch/)
155
+ - 2024/7: The [SenseVoice-Small](https://www.modelscope.cn/models/iic/SenseVoiceSmall) voice understanding model is open-sourced, which offers high-precision multilingual speech recognition, emotion recognition, and audio event detection capabilities for Mandarin, Cantonese, English, Japanese, and Korean and leads to exceptionally low inference latency.
156
+ - 2024/7: The CosyVoice for natural speech generation with multi-language, timbre, and emotion control. CosyVoice excels in multi-lingual voice generation, zero-shot voice generation, cross-lingual voice cloning, and instruction-following capabilities. [CosyVoice repo](https://github.com/FunAudioLLM/CosyVoice) and [CosyVoice space](https://www.modelscope.cn/studios/iic/CosyVoice-300M).
157
+ - 2024/7: [FunASR](https://github.com/modelscope/FunASR) is a fundamental speech recognition toolkit that offers a variety of features, including speech recognition (ASR), Voice Activity Detection (VAD), Punctuation Restoration, Language Models, Speaker Verification, Speaker Diarization and multi-talker ASR.
158
+
159
+ <a name="Benchmarks"></a>
160
+ # Benchmarks 📝
161
+
162
+ ## Multilingual Speech Recognition
163
+ We compared the performance of multilingual speech recognition between SenseVoice and Whisper on open-source benchmark datasets, including AISHELL-1, AISHELL-2, Wenetspeech, LibriSpeech, and Common Voice. In terms of Chinese and Cantonese recognition, the SenseVoice-Small model has advantages.
164
+
165
+ <div align="center">
166
+ <img src="image/asr_results1.png" width="400" /><img src="image/asr_results2.png" width="400" />
167
+ </div>
168
+
169
+ ## Speech Emotion Recognition
170
+
171
+ Due to the current lack of widely-used benchmarks and methods for speech emotion recognition, we conducted evaluations across various metrics on multiple test sets and performed a comprehensive comparison with numerous results from recent benchmarks. The selected test sets encompass data in both Chinese and English, and include multiple styles such as performances, films, and natural conversations. Without finetuning on the target data, SenseVoice was able to achieve and exceed the performance of the current best speech emotion recognition models.
172
+
173
+ <div align="center">
174
+ <img src="image/ser_table.png" width="1000" />
175
+ </div>
176
+
177
+ Furthermore, we compared multiple open-source speech emotion recognition models on the test sets, and the results indicate that the SenseVoice-Large model achieved the best performance on nearly all datasets, while the SenseVoice-Small model also surpassed other open-source models on the majority of the datasets.
178
+
179
+ <div align="center">
180
+ <img src="image/ser_figure.png" width="500" />
181
+ </div>
182
+
183
+ ## Audio Event Detection
184
+
185
+ Although trained exclusively on speech data, SenseVoice can still function as a standalone event detection model. We compared its performance on the environmental sound classification ESC-50 dataset against the widely used industry models BEATS and PANN. The SenseVoice model achieved commendable results on these tasks. However, due to limitations in training data and methodology, its event classification performance has some gaps compared to specialized AED models.
186
+
187
+ <div align="center">
188
+ <img src="image/aed_figure.png" width="500" />
189
+ </div>
190
+
191
+ ## Computational Efficiency
192
+
193
+ The SenseVoice-Small model deploys a non-autoregressive end-to-end architecture, resulting in extremely low inference latency. With a similar number of parameters to the Whisper-Small model, it infers more than 5 times faster than Whisper-Small and 15 times faster than Whisper-Large.
194
+
195
+ <div align="center">
196
+ <img src="image/inference.png" width="1000" />
197
+ </div>
198
+
199
+
200
+ # Requirements
201
+
202
+ ```shell
203
+ pip install -r requirements.txt
204
+ ```
205
+
206
+ <a name="Usage"></a>
207
+ # Usage
208
+
209
+ ## Inference
210
+
211
+ Supports input of audio in any format and of any duration.
212
+
213
+ ```python
214
+ from funasr import AutoModel
215
+ from funasr.utils.postprocess_utils import rich_transcription_postprocess
216
+
217
+ model_dir = "FunAudioLLM/SenseVoiceSmall"
218
+
219
+
220
+ model = AutoModel(
221
+ model=model_dir,
222
+ vad_model="fsmn-vad",
223
+ vad_kwargs={"max_single_segment_time": 30000},
224
+ device="cuda:0",
225
+ hub="hf",
226
+ )
227
+
228
+ # en
229
+ res = model.generate(
230
+ input=f"{model.model_path}/example/en.mp3",
231
+ cache={},
232
+ language="auto", # "zn", "en", "yue", "ja", "ko", "nospeech"
233
+ use_itn=True,
234
+ batch_size_s=60,
235
+ merge_vad=True, #
236
+ merge_length_s=15,
237
+ )
238
+ text = rich_transcription_postprocess(res[0]["text"])
239
+ print(text)
240
+ ```
241
+
242
+ Parameter Description:
243
+ - `model_dir`: The name of the model, or the path to the model on the local disk.
244
+ - `vad_model`: This indicates the activation of VAD (Voice Activity Detection). The purpose of VAD is to split long audio into shorter clips. In this case, the inference time includes both VAD and SenseVoice total consumption, and represents the end-to-end latency. If you wish to test the SenseVoice model's inference time separately, the VAD model can be disabled.
245
+ - `vad_kwargs`: Specifies the configurations for the VAD model. `max_single_segment_time`: denotes the maximum duration for audio segmentation by the `vad_model`, with the unit being milliseconds (ms).
246
+ - `use_itn`: Whether the output result includes punctuation and inverse text normalization.
247
+ - `batch_size_s`: Indicates the use of dynamic batching, where the total duration of audio in the batch is measured in seconds (s).
248
+ - `merge_vad`: Whether to merge short audio fragments segmented by the VAD model, with the merged length being `merge_length_s`, in seconds (s).
249
+
250
+ If all inputs are short audios (<30s), and batch inference is needed to speed up inference efficiency, the VAD model can be removed, and `batch_size` can be set accordingly.
251
+ ```python
252
+ model = AutoModel(model=model_dir, device="cuda:0", hub="hf")
253
+
254
+ res = model.generate(
255
+ input=f"{model.model_path}/example/en.mp3",
256
+ cache={},
257
+ language="zh", # "zn", "en", "yue", "ja", "ko", "nospeech"
258
+ use_itn=False,
259
+ batch_size=64,
260
+ hub="hf",
261
+ )
262
+ ```
263
+
264
+ For more usage, please refer to [docs](https://github.com/modelscope/FunASR/blob/main/docs/tutorial/README.md)
265
+
266
+ ### Inference directly
267
+
268
+ Supports input of audio in any format, with an input duration limit of 30 seconds or less.
269
+
270
+ ```python
271
+ from model import SenseVoiceSmall
272
+ from funasr.utils.postprocess_utils import rich_transcription_postprocess
273
+
274
+ model_dir = "FunAudioLLM/SenseVoiceSmall"
275
+ m, kwargs = SenseVoiceSmall.from_pretrained(model=model_dir, device="cuda:0", hub="hf")
276
+ m.eval()
277
+
278
+ res = m.inference(
279
+ data_in=f"{kwargs['model_path']}/example/en.mp3",
280
+ language="auto", # "zn", "en", "yue", "ja", "ko", "nospeech"
281
+ use_itn=False,
282
+ **kwargs,
283
+ )
284
+
285
+ text = rich_transcription_postprocess(res[0][0]["text"])
286
+ print(text)
287
+ ```
288
+
289
+ ### Export and Test (*On going*)
290
+ Ref to [SenseVoice](https://github.com/FunAudioLLM/SenseVoice)
291
+ ## Service
292
+
293
+ Ref to [SenseVoice](https://github.com/FunAudioLLM/SenseVoice)
294
+
295
+ ## Finetune
296
+
297
+ Ref to [SenseVoice](https://github.com/FunAudioLLM/SenseVoice)
298
+
299
+ ## WebUI
300
+
301
+ ```shell
302
+ python webui.py
303
+ ```
304
+
305
+ <div align="center"><img src="image/webui.png" width="700"/> </div>
306
+
307
+ <a name="Community"></a>
308
+ # Community
309
+ If you encounter problems in use, you can directly raise Issues on the github page.
310
+
311
+ You can also scan the following DingTalk group QR code to join the community group for communication and discussion.
312
+
313
+ | FunAudioLLM | FunASR |
314
+ |:----------------------------------------------------------------:|:--------------------------------------------------------:|
315
+ | <div align="left"><img src="image/dingding_sv.png" width="250"/> | <img src="image/dingding_funasr.png" width="250"/></div> |
SenseVoiceSmall-F16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3019f4915d2c2fa986f7274e5c6a9770bf378ba4933d3e45e68daa994265fa0c
3
+ size 470411968
SenseVoiceSmall-F32.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:190a5de4dea8a78b298a71e59e6decf19e898ffaece8376b6d3d6b9ca200003c
3
+ size 936617664
SenseVoiceSmall-Q4_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:31bc3e7793eff8be00e9836bb5121c0b167904368a7c4e227e89ac7b2b538563
3
+ size 145738144
SenseVoiceSmall-Q5_K_M.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:087f4e3b76b612ba9bcf9805a3e3ca82f548ac0d995c5f729265cbc724c2c869
3
+ size 172474720
SenseVoiceSmall-Q6_K.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:189b2649472aa9b045683c49d51060f1a044f64a2321a80eddf8ffb212a9245f
3
+ size 196438176
SenseVoiceSmall-Q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:20f5758787a6bd498ecea263cd0b56f045d6bfb76f3827d303def9a23547b01a
3
+ size 252684448