SenseVoice is an audio foundation model with audio understanding capabilities, including Automatic Speech Recognition (ASR), Language Identification (LID), Speech Emotion Recognition (SER), and Acoustic Event Classification (AEC) or Acoustic Event Detection (AED).
Currently, SenseVoice-small supports multilingual speech recognition, emotion recognition, and event detection for Chinese, Cantonese, English, Japanese, and Korean, with extremely low inference latency.
Inference speed (RKNN2): About 20x real-time on a single NPU core of RK3588 (processing 20 seconds of audio per second), approximately 6 times faster than the official whisper model provided in the rknn-model-zoo.
If you find that recognition is not working correctly when testing with your own audio files, you may need to convert them to 16kHz, 16-bit, mono WAV format in advance.
The model file should be named 'sense-voice-encoder.onnx' and placed in the same directory as the conversion script.
Convert to RKNN model
python convert_rknn.py
Known Issues
When using fp16 inference with RKNN2, overflow may occur, resulting in inf values. You can try modifying the scaling ratio of the input data to resolve this.
Set SPEECH_SCALE to a smaller value in sensevoice_rknn.py.
Response Body: JSON object with the following fields:
full_transcription (string): The complete transcribed text, including any special tokens from the model.
segments (list of objects): A list where each object represents a transcribed audio segment and contains:
start_time_s (float): Start time of the segment in seconds.
end_time_s (float): End time of the segment in seconds.
text (string): Transcribed text for the segment.
Example Response:
json
1{2"full_transcription":"<|en|><|HAPPY|><|Speech|><|woitn|>the stale smell of old beer lingers <|en|><|NEUTRAL|><|Speech|><|woitn|>it takes heat to bring out the odor but <|en|><|HAPPY|><|Speech|><|woitn|>a cold dip restores health and zest a salt pickle tastes fine with ham tacos al pastor are my favorite <|en|><|EMO_UNKNOWN|><|Speech|><|woitn|>a zestful food is the hot cross bun",3"segments":[4{5"start_time_s":1.01,6"end_time_s":3.93,7"text":"<|en|><|HAPPY|><|Speech|><|woitn|>the stale smell of old beer lingers"8},9{10"start_time_s":4.21,11"end_time_s":6.59,12"text":"<|en|><|NEUTRAL|><|Speech|><|woitn|>it takes heat to bring out the odor but"13},14{15"start_time_s":6.87,16"end_time_s":14.68,17"text":"<|en|><|HAPPY|><|Speech|><|woitn|>a cold dip restores health and zest a salt pickle tastes fine with ham tacos al pastor are my favorite"18},19{20"start_time_s":14.96,21"end_time_s":18.34,22"text":"<|en|><|EMO_UNKNOWN|><|Speech|><|woitn|>a zestful food is the hot cross bun"23}24]25}