# SenseVoice API

SenseVoice API is an OpenAI-compatible speech-to-text API that wraps SenseVoice-Small to provide low-latency transcription with automatic language identification, emotion detection, audio event detection, word-level. It is open source and self-hosted, installable on Unraid.

Canonical page: https://ourlocalhost.com/app/3301/sensevoice-api

## Description

SenseVoice API is an OpenAI-compatible speech-to-text API that wraps SenseVoice-Small to provide low-latency transcription with automatic language identification, emotion detection, audio event detection, word-level timestamps, and WebSocket streaming for self-hosted applications.

## Platform availability

Available on 1 of 10 platforms: Unraid.

## Health score

34/100 (Low), based on 4 of 4 factors.
- Maintained: 60 (last commit 149 days ago)
- Popular: 6 (1 GitHub stars)
- Easy to install: 35 (1 install platform, install notes, Docker image)
- Light to run: 10 (16 GB minimum RAM)

## Links

- GitHub: https://github.com/hsiang-han/SenseVoice-API
- Unraid: https://ca.unraid.net/apps/sensevoice-api-12fazqs1105loo?q=SenseVoice-API

## Common questions

### Can existing OpenAI SDK audio transcription code point to SenseVoice-API?

Yes, use the local v1 endpoint on port 10095, request model sensevoice-small, and set the API key to none.

### How do I get word-level timestamps, emotion, and audio event labels?

Send response_format=verbose_json with the transcription request. The response includes language, duration, emotion, event, processing time, and per-word start and end times.

### Does SenseVoice-API support WebSocket streaming?

Yes, connect to the stream endpoint on port 10095 and send audio bytes. It returns a JSON result with text, language, emotion, event, and is_final.

### How do I enable speaker diarization?

Set ENABLE_SPK=true, which uses the cam++ model. The verbose response then includes segments with speaker IDs, start and end times, text, and emotion.

### Can SenseVoice-API run without a GPU?

Yes, use CPU-only mode by setting DEVICE to cpu and removing --gpus all from the container parameters.

### How do I avoid re-downloading the model after container recreation?

Mount a persistent directory to /root/.cache/huggingface so the approximately 900MB model download is reused on later starts.

---
Source: Our Local Host (https://ourlocalhost.com/app/3301/sensevoice-api), the self-hosted and open-source app directory.
