Skip to content

Feature Request: Add FunASR as an ASR backend option #645

Description

@LauraGPT

Summary

Would it be possible to add FunASR as an alternative ASR backend alongside faster-whisper?

Why FunASR?

FunASR's toolkit source is MIT-licensed; individual model weights retain their own model-card licenses. It has some compelling advantages:

FunASR (SenseVoice) faster-whisper large-v3
Speed (GPU) 170x realtime ~46x realtime
Speed (CPU) 17x realtime not viable
Speaker diarization Built-in (cam++) Needs pyannote
Punctuation Built-in Needs post-processing
Languages 50+ 57
Streaming WebSocket native Needs wrapper
License Toolkit code: MIT; weights vary (SenseVoiceSmall: custom license) MIT

Integration approach

FunASR already provides an OpenAI-compatible API endpoint (funasr-server), so it could potentially be integrated as:

  1. Backend option: similar to how faster-whisper is used — pip install funasr, then use AutoModel for inference
  2. Proxy mode: point speaches at a running funasr-server instance

Basic usage:

from funasr import AutoModel

model = AutoModel(model="iic/SenseVoiceSmall", vad_model="fsmn-vad", device="cuda")
result = model.generate(input="audio.wav")
# Returns: [{"text": "...", "timestamp": [...]}]

What I can help with

I'm a contributor to FunASR and happy to help with a PR if there's interest. The main effort would be writing a backend adapter that maps FunASR's output format to speaches' internal representation.

PyPI: pip install funasr (latest: 1.3.8)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions