Skip to content

FunASR-powered video transcription, subtitle generation, and LLM-assisted clipping tool with a local Gradio UI.

feat: add SenseVoice model support with emotion and audio event detection

游雁cde4b68ad420
diff --git a/README.md b/README.md
index e898cd8..cf70907 100644
--- a/README.md
+++ b/README.md
@@ -34,7 +34,7 @@
<a name="What's New"></a>
## What's New🚀
-- 2026/05/20 FunClip now supports Fun-ASR-Nano model with higher accuracy, timestamp and speaker diarization for 31 languages. Run `python funclip/launch.py -m fun-asr-nano` to try.
+- 2026/05/20 FunClip now supports Fun-ASR-Nano and SenseVoice models. Fun-ASR-Nano provides higher accuracy for 31 languages; SenseVoice adds emotion recognition and audio event detection. Run `python funclip/launch.py -m fun-asr-nano` or `-m sensevoice` to try.
- 2024/06/12 FunClip supports recognize and clip English audio files now. Run `python funclip/launch.py -l en` to try.
- 🔥2024/05/13 FunClip v2.0.0 now supports smart clipping with large language models, integrating models from the qwen series, GPT series, etc., providing default prompts. You can also explore and share tips for setting prompts, the usage is as follows:
1. After the recognition, select the name of the large model and configure your own apikey;
@@ -109,6 +109,7 @@ You can establish your own FunClip service which is same as [Modelscope Space](h
```shell
python funclip/launch.py
# '-m fun-asr-nano' for Fun-ASR-Nano model (higher accuracy, 31 languages)
+# '-m sensevoice' for SenseVoice model (multilingual ASR + emotion + audio event detection)
# '-l en' for English audio recognize
# '-p xxx' for setting port number
# '-s True' for establishing service for public accessing
diff --git a/funclip/launch.py b/funclip/launch.py
index 1409224..b224af6 100644
--- a/funclip/launch.py
+++ b/funclip/launch.py
@@ -22,7 +22,7 @@ from introduction import top_md_1, top_md_3, top_md_4
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='argparse testing')
parser.add_argument('--lang', '-l', type=str, default = "zh", help="language")
- parser.add_argument('--model', '-m', type=str, default="paraformer", choices=["paraformer", "fun-asr-nano"], help="ASR model: paraformer or fun-asr-nano")
+ parser.add_argument('--model', '-m', type=str, default="paraformer", choices=["paraformer", "fun-asr-nano", "sensevoice"], help="ASR model: paraformer, fun-asr-nano, or sensevoice")
parser.add_argument('--share', '-s', action='store_true', help="if to establish gradio share link")
parser.add_argument('--port', '-p', type=int, default=7860, help='port number')
parser.add_argument('--listen', action='store_true', help="if to listen to all hosts")
@@ -39,6 +39,13 @@ if __name__ == "__main__":
spk_model="cam++",
hub="hf",
)
+ elif hasattr(args, 'model') and args.model == 'sensevoice':
+ funasr_model = AutoModel(model="iic/SenseVoiceSmall",
+ vad_model="fsmn-vad",
+ vad_kwargs={"max_single_segment_time": 30000},
+ punc_model="ct-punc",
+ spk_model="cam++",
+ )
else:
funasr_model = AutoModel(model="iic/speech_seaco_paraformer_large_asr_nat-zh-cn-16k-common-vocab8404-pytorch",
vad_model="damo/speech_fsmn_vad_zh-cn-16k-common-pytorch",