Skip to content

Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.

9.5 KB
Raw Blame
<!DOCTYPE html>
<html lang="en"><head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>How should you use SenseVoice emotion tags? | FunASR</title>
<meta name="description" content="Separate raw predictions, display text and evaluation labels with a real CPU readout. Preserve unknown results without treating tags as a person's true state.">
<meta property="og:title" content="How should you use SenseVoice emotion tags?"><meta property="og:description" content="Separate raw predictions, display text and evaluation labels with a real CPU readout. Preserve unknown results without treating tags as a person's true state."><meta property="og:type" content="article"><meta property="og:url" content="https://www.funasr.com/en/blog/sensevoice-emotion-language-detection.html"><meta property="og:image" content="https://www.funasr.com/img/sensevoice-tags-waveform.png">
<link rel="canonical" href="https://www.funasr.com/en/blog/sensevoice-emotion-language-detection.html"><link rel="alternate" hreflang="zh" href="https://www.funasr.com/blog/sensevoice-emotion-language-detection.html">
<script type="application/ld+json">{"@context":"https://schema.org","@type":"BlogPosting","headline":"How should you use SenseVoice emotion tags?","description":"Separate raw predictions, display text and evaluation labels with a real CPU readout. Preserve unknown results without treating tags as a person's true state.","datePublished":"2026-06-19","dateModified":"2026-09-10","author":{"@type":"Organization","name":"FunASR"},"mainEntityOfPage":{"@type":"WebPage","@id":"https://www.funasr.com/en/blog/sensevoice-emotion-language-detection.html"}}</script>
<style>body{margin:0;font-family:system-ui,sans-serif;color:#202827;line-height:1.8;background:#fff}*{box-sizing:border-box}.container{max-width:920px;margin:auto;padding:0 24px}a{color:#006a57;text-decoration:underline;text-underline-offset:.15em}.nav{padding:14px 0;border-bottom:1px solid #dce3df}.nav .container{display:flex;gap:20px;align-items:center}.nav-logo{font-weight:700}.nav-links{margin-left:auto}article{padding:48px 0 64px}h1{font-size:2rem;line-height:1.3;letter-spacing:0}h2{font-size:1.4rem;margin-top:36px;letter-spacing:0}.lead{font-size:1.1rem}.meta,figcaption{color:#515c56;font-size:.875rem}figure{margin:24px 0}figure img{display:block;max-width:100%;height:auto}code{overflow-wrap:anywhere}pre{padding:16px;background:#f3f6f5;border:1px solid #dce3df;border-radius:6px;font-size:.875rem;white-space:pre-wrap;overflow-wrap:anywhere}.legacy-page pre[data-example]{white-space:pre-wrap;overflow-wrap:anywhere;padding-top:54px}footer{padding:24px;border-top:1px solid #dce3df}@media(max-width:700px){.container{padding:0 20px}h1{font-size:1.6rem}.nav-links{display:none}}</style>
</head><body>
<nav class="nav"><div class="container"><a class="nav-logo" href="/en/">FunASR</a><div class="nav-links"><a href="/en/blog/">Blog</a></div><a href="/blog/sensevoice-emotion-language-detection.html">中文</a><a href="/go/github">GitHub</a></div></nav>
<article><div class="container">
<h1>How should you use SenseVoice emotion tags?</h1>
<p class="meta">Revised 2026-09-10 · Technical explanation · 5 min read</p>
<p class="lead" data-editorial="opening">A customer-call transcript starts with ANGRY or NEUTRAL. Can your application use that to decide how the customer feels? First separate three things: the model's prediction for an audio segment, the text you display, and the evidence used to evaluate it.</p>
<p data-editorial="boundary">An emotion tag is not a person's true mental state, identity or diagnosis, nor a calibrated confidence score. After validation, it may help a human find recordings to review. It should not independently determine employee evaluations, customer treatment or other consequential decisions about people.</p>
<h2>Keep the raw result first</h2>
<p>SenseVoiceSmall produces language, emotion, audio-event and text-normalization tags alongside transcription. This short-audio example uses neither VAD nor speaker diarization. Place a short recording you are entitled to use at <code>audio.wav</code>; the first model-ID load needs to download weights.</p>
<p data-editorial="environment">First prepare a CPU environment using the maintained <a data-installation-guide href="/en/docs/installation.html">installation and environment checks</a>. Verify that PyTorch and torchaudio import successfully and have compatible versions. <code>python -m pip install "funasr==1.4.15"</code> only pins the FunASR package; it is not a complete fresh-environment installation.</p>
<pre data-example="recognize">from funasr import AutoModel
from funasr.utils.postprocess_utils import rich_transcription_postprocess

model = AutoModel(
    model="iic/SenseVoiceSmall",
    device="cpu",
    disable_update=True,
)
raw = model.generate(
    input="audio.wav",
    language="auto",
    use_itn=True,
    ban_emo_unk=False,
)[0]["text"]

print("raw:", raw)
print("display:", rich_transcription_postprocess(raw))</pre>
<p>The following is a real readout from the official <a href="https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/asr_example_zh.wav">Chinese speech sample</a>, using Linux CPU, FunASR 1.4.15, PyTorch/torchaudio 2.10.0 and cached SenseVoiceSmall weights. The audio is about 5.55 seconds long. This is a functional check, not an emotion-accuracy or speed benchmark.</p>
<figure><img src="/img/sensevoice-tags-waveform.png" width="1800" height="450" alt="Actual waveform of the public Chinese sample, with time and amplitude axes"><figcaption>The input waveform, not emotion intensity, model attention or a confidence curve.</figcaption></figure>
<p><strong>Raw prediction</strong></p>
<pre data-example="raw-output">&lt;|zh|&gt;&lt;|NEUTRAL|&gt;&lt;|Speech|&gt;&lt;|withitn|&gt;欢迎大家来体验达摩院推出的语音识别模型。</pre>
<p><strong>Display text</strong></p>
<pre data-example="display-output">欢迎大家来体验达摩院推出的语音识别模型。</pre>
<p>Here <code>zh</code> is the predicted language, <code>NEUTRAL</code> the emotion category, <code>Speech</code> the audio-event tag and <code>withitn</code> the text-normalization mode. None proves the prediction correct. A Speech tag does not guarantee the entire recording is free from music or noise. This sample has no human emotion ground truth, so it does not establish emotion accuracy.</p>
<h2>Display text is not an evaluation label</h2>
<p><code>rich_transcription_postprocess()</code> makes output suitable for display; it does not promise plain text only. It may remove control tags or represent emotion and events with emoji. The next input is a <strong>constructed tag string</strong>, not another recording's prediction. Running the same postprocessor demonstrates the difference.</p>
<pre data-example="synthetic-display">Input: &lt;|zh|&gt;&lt;|HAPPY|&gt;&lt;|Speech|&gt;&lt;|withitn|&gt;今天放假。
Display: 今天放假。😊</pre>
<p>Splitting display text and treating a word position as an emotion label loses or misreads information. Keep raw output such as <code>res[0]["text"]</code>, parse it under the task's rules and store the display version separately. Different segments may have different predictions. One recording-level tag is not a timestamped or per-speaker account of emotion.</p>
<p>Likewise, <code>ban_emo_unk=True</code> does not mean “more accurate.” The <a href="https://github.com/FunAudioLLM/SenseVoice/blob/4482962437ce8ebd1f0ac5b6793d2f82d2e2955d/model.py#L858">implementation</a> masks the unknown-emotion token's decoding score. Disallowing unknown does not provide new evidence. The example explicitly preserves that option. Send unknown or unparseable results for inspection instead of silently turning them into NEUTRAL.</p>
<h2>Fix the evaluation contract before quoting a score</h2>
<p>The <a href="https://github.com/FunAudioLLM/SenseVoice/issues/212">CASIA / RAVDESS community reproduction issue</a> remains unresolved. This article does not reproduce the paper's scores or access or distribute either dataset. First fix the lawful dataset version, sample manifest, class mapping, weight hash, software versions and metric definitions.</p>
<p>The maintained SER evaluator reads six evaluation classes from raw output, normalizes fear/fearful and surprise/surprised, and fails on outputs without a supported emotion tag instead of silently dropping records. This six-class evaluation contract is <strong>not the complete model vocabulary</strong> or a universal parser for arbitrary applications.</p>
<p>It reports WA (accuracy across all records) and UA (mean recall across the classes present in the manifest). A <strong>synthetic counting example</strong>: predict neutral for nine neutral records and one angry record, and WA is 90% while UA is 50%. This checks the maintained metric function, not SenseVoice performance. One aggregate score can hide total failure on a minority class.</p>
<p>For an application, listen to a sample covering your languages, noise, devices and speaking styles. Record false positives and unknown results before adopting the auxiliary tag. For “who spoke when,” follow the <a href="/en/blog/meeting-transcript-acceptance.html">speaker and time-coverage acceptance path</a>; do not infer identity from emotion tags.</p>
<p data-editorial="next-step">Next, open the pinned <a href="https://github.com/FunAudioLLM/SenseVoice/blob/4482962437ce8ebd1f0ac5b6793d2f82d2e2955d/benchmarks/ser/README.md">SenseVoice SER evaluation guide</a>. Start with your lawful manifest and retain raw outputs and unsuccessful cases.</p>
</div></article><footer><div class="container">FunASR · Technical explanations</div></footer>
</body></html>