Skip to content

Example: Serve FunASR/SenseVoice for speech recognition #688

Description

@LauraGPT

Note

License and capability clarification (2026-07-14): FunASR is a toolkit, not a single checkpoint. The FunASR and SenseVoice repository source code is MIT; model weights follow each model card. SenseVoiceSmall supports Chinese, Cantonese, English, Japanese, and Korean, and its weights use the linked FunASR Model Open Source License Agreement. Fun-ASR-Nano-2512 is Apache-2.0. Language coverage, punctuation, and performance depend on the selected model and runtime configuration.

Hi! Great lightweight inference server framework!

Would you consider adding a FunASR/SenseVoice example for speech recognition serving?

Why?

  • Most popular open-source ASR — FunASR 16K+ stars, SenseVoice 8K+
  • Simple Python API — Perfect fit for LitServe
  • Ultra-fast — SenseVoice-Small: ~70ms/10s, ideal for low-latency serving
  • High demand — Many users want to deploy ASR as API

Example LitServe server

import litserve as ls
from funasr import AutoModel

class SpeechRecognitionAPI(ls.LitAPI):
    def setup(self, device):
        self.model = AutoModel(model="iic/SenseVoiceSmall", device=device)
    
    def predict(self, audio_data):
        result = self.model.generate(input=audio_data)
        return {"text": result[0]["text"]}

server = ls.LitServer(SpeechRecognitionAPI(), accelerator="auto")
server.run()

References

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