# 语音识别语义解释

**语音识别语义解释**（Semantic Interpretation for Speech Recognition，SISR）是世界万维网联盟（W3C）的一项规范，它定义了添加到语音识别语法中的标签如何计算出话语含义的机器可读表示，并依据识别器所匹配的规则和词元将该表示返回给应用程序。<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup> 它填补了[语音识别语法规范](https://www.edgepedia.org/zh/speech-recognition-grammar-specification)（SRGS）留下的空白——后者定义了识别器所聆听的词语和模式，却未定义如何由此产生结果。<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup> 1.0 版于 2007 年 4 月 5 日达到 W3C 推荐标准地位，由语音浏览器工作组作为 W3C 语音接口框架的一部分制定。<sup>[2](https://www.w3.org/standards/history/semantic-interpretation/)</sup>

| 关键事实 | 详情 |
|---|---|
| 全名与状态 | 语音识别语义解释（SISR）1.0 版，W3C 推荐标准，2007 年 4 月 5 日<sup>[2](https://www.w3.org/standards/history/semantic-interpretation/)</sup> |
| 用途 | 定义 SRGS 语法中标签内容的语法和语义，以序列化 XML 或 ECMAScript 变量的形式输出<sup>[3](https://www.w3.org/news/2007/semantic-interpretation-for-speech-recognition-sisr-is-a-w3c-recommendation/)</sup> |
| 两种标签语法 | “脚本”语法（`semantics/1.0`），使用紧凑配置文件 ECMA-327 的 ECMAScript 代码；“字符串字面量”语法（`semantics/1.0-literals`），纯字符串<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup> |
| 结果形式 | 语义结果是根规则之规则变量的值；它表示为 ECMAScript 对象，可序列化为 XML<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup> |
| 保留命名空间 | 以 `semantics/x.y` 开头的标签格式值保留给 SISR 及本规范的未来版本<sup>[4](https://www.w3.org/TR/speech-grammar/)</sup> |
| 编辑 | Luc Van Tichelen（Nuance Communications，主编）与 Dave Burke（Voxpilot）<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup> |

## 此处语义解释的含义

语音识别器将音频与语法进行匹配，生成所说内容的原始文本转写。应用程序通常需要的远不止转写文本：对于“我想预订一班从布拉格到巴黎的航班”这样的话语，有用的结果是结构化数据，例如一个 `<book-flight>` 元素，其子元素为 `<depart>Prague</depart>` 和 `<arrive>Paris</arrive>`。<sup>[4](https://www.w3.org/TR/speech-grammar/)</sup> SISR 将生成这种表示的过程称为语义解释，而表示本身称为语义结果。<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup>

W3C 文档所描述的解释形式是刻意受限的。它不解析跨越单条话语以上的指代，例如航班预订请求之后“我想从那里继续到伦敦”中的“那里”；那属于对话管理器的职责，例如 VoiceXML 应用程序。语音识别语法通常覆盖狭窄的领域（航班预订、命令列表），而从原始文本到语义结果的转换是语言相关的，因为每种语言都有自己的结构。<sup>[4](https://www.w3.org/TR/speech-grammar/)</sup>

## 机制如何运作

基本原则是：语义信息表示为与语法非终结符相关联的值；标签内容是 [ECMAScript](https://www.edgepedia.org/zh/ecmascript) 代码或[字符串](https://www.edgepedia.org/zh/string)字面量；求值顺序遵循语法规则定义和已识别词语的顺序。<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup>

**语义解释标签。** 标签置于 SRGS 语法规则展开式的 `tag` 元素中（ABNF 语法形式中的花括号或 `{!{ ... }!}` 序列）。语法通过 `tag-format` 声明来声明其标签使用哪种语法；两种语法不能在同一语法中混用，不过外部引用的语法可以使用与其父语法不同的格式。<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup>

**脚本语法。** 当 `tag-format` 设为 `semantics/1.0` 时，每个标签包含一段 ECMAScript 紧凑配置文件（ECMA-327）程序，这是标准 ECMAScript 的严格子集，专为资源受限环境设计，且便于预编译，适合附加在语法规则上的轻量级运行时。<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup>

**字符串字面量语法。** 当 `tag-format` 设为 `semantics/1.0-literals` 时，每个标签是一个纯字符串，其行为类似于将该字符串赋给规则变量的脚本。它缺乏脚本的表达能力，但适合简单语法，如命令列表或确认语法——在这些语法中，一个或多个口头变体（“yes”、“yeah”、“you bet”、法语“oui”）映射到单一返回值。<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup><sup> • </sup><sup>[5](https://speechweb.cpqd.com.br/asr/docs/3.1.0/en-us/user_guide/grammar_dev/sema.html)</sup> 标签格式设置错误的作者会遭遇不对称的失败：`semantics/1.0` 下的字面量标签通常导致运行时错误，而 `semantics/1.0-literals` 下的脚本标签则会静默地用 ECMAScript 源文本填充变量。<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup>

**规则变量。** 每条语法规则都有一个规则变量，在脚本中标识为 `out`，用于保存语义值；标签还可以读取被引用规则的变量，以及附加的 `text`（规则所匹配的词元）和 `score`（置信度或概率度量）变量。所有求值完成后，整条话语的结果就是根规则的规则变量。<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup> 如果匹配的规则没有标签，默认赋值会将匹配文本复制到变量中；或者，如果解析包含规则引用，则复制最后被引用规则的变量。<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup> 分数依赖于具体实现，通常只能在同一语法和处理器内比较，其用途是标注结果而非影响解释。<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup>

**脚本实战。** 规范中的数字示例说明了为何需要脚本：口语数字的规则赋予数值（`seven {out = 7;}`），更高层规则以算术方式组合被引用的值，例如在匹配“三千二百”式短语的规则中 `out = (1000 * rules.sub_hundred)`，然后用 `out += rules.sub_thousand` 加上子结果。<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup> 一个将识别出的数字用空格连接的数字序列语法需要调整最后一条指令以避免末尾空格。<sup>[6](https://citeseerx.ist.psu.edu/document?doi=4b4051d31752496774c860553def3226bf5416e4&repid=rep1&type=pdf)</sup> 这种规范化无法仅用字面量标签和默认赋值来表达。<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup>

**序列化。** 规范定义了如何将 ECMAScript 结果序列化为 XML 片段，以便与 EMMA（W3C 多模态交互活动的 XML 数据格式）等结果格式配合使用。如果顶层规则变量是简单标量（String、Number、Boolean、Null 或 Undefined），则 XML 片段是不带标记的字符数据；该转换有已记录的局限，包括不可逆性、循环引用的平台相关处理，以及因 ECMAScript 对象属性无序而导致的元素顺序未定义。<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup>

## 与 W3C 语音栈的关系

SISR 与 SRGS 和 VoiceXML 同属 W3C 语音接口框架。SRGS 为 SISR 保留了 `semantics/x.y` 标签格式命名空间，并将 `tag` 元素定义为语义处理器指令的占位符，其解释依据被识别输入的逻辑解析结构来定义。<sup>[4](https://www.w3.org/TR/speech-grammar/)</sup> VoiceXML 2.0 明确将标签的语法和语义交由 SISR 处理，并将用户输入的语义结果映射到表单处理；在语音浏览器架构中，结果直接转换为 VoiceXML 解释器中的 ECMAScript 变量。<sup>[7](https://www.dejavu.org/cgi-bin/get.cgi?url=https%3A%2F%2Fwww.w3.org%2FTR%2Fvoicexml20%2F%23dmlAAccessibility&ver=95)</sup><sup> • </sup><sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup>

SISR 1.0 发布时，W3C 将其与 VoiceXML 2.1 一同公布，宣布完成了面向语音驱动 Web 应用的两项标准，并将 SISR 描述为改进了语音到标记的转换，从而提升语音识别系统的性能。<sup>[8](https://lists.w3.org/Archives/Public/w3c-news/2007AprJun/0005.html)</sup> 一份同时期的语音标准分析指出，SRGS 1.0 未定义结果的产生方式，将其委托给 SISR；而语法内部的脚本将依赖应用程序的规范化移入语法本身，从而将应用需求与呼叫者语言的自然表达分离开来。<sup>[9](https://www.ndl.ethernet.edu.et/bitstream/123456789/72620/1/133.pdf.pdf)</sup>

## 实现

SISR 1.0 实现报告列出了附带测试套件的实现；该规范于 2006 年 1 月 11 日进入候选推荐阶段，随后达到完整推荐标准地位。<sup>[1](https://www.w3.org/TR/semantic-interpretation/)</sup><sup> • </sup><sup>[10](https://www.w3.org/Voice/2007/sisr-ir/)</sup> 据报道，Loquendo ASR 7.0 完全支持该规范，包括脚本和字符串字面量两种标签语法。<sup>[10](https://www.w3.org/Voice/2007/sisr-ir/)</sup> 后续语音系统持续提供支持：CPQD ASR 库在 SRGS 语法中接受两种格式的 SISR 标签，<sup>[5](https://speechweb.cpqd.com.br/asr/docs/3.1.0/en-us/user_guide/grammar_dev/sema.html)</sup> Nuance Speech Suite 为其语法记录了 SISR 规范中的 W3C 标签语法，<sup>[11](https://docs.nuance.com/speech-suite/nr-gram/nrg_basic_writing_standards.html)</sup> 微软的 SAPI 5.3 支持带有语义信息标注的 SRGS 语法，例如“yes”、“yeah”和“yep”都携带语义值“yes”。<sup>[12](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ms723627%28v%3Dvs.85%29)</sup> 在微软的 System.Speech 中，识别结果的语义表示为 `SemanticValue` 对象树。<sup>[13](https://learn.microsoft.com/en-us/dotnet/api/system.speech.recognition.semanticvalue?view=net-10.0)</sup>

该规范仍停留在 1.0 版，在所查阅的资料中未见后续版本发布；SRGS 对 `semantics/x.y` 的保留为未来版本留出了空间。<sup>[4](https://www.w3.org/TR/speech-grammar/)</sup>

## References

1. [Semantic Interpretation for Speech Recognition (SISR) Version 1.0, W3C Recommendation 5 April 2007](https://www.w3.org/TR/semantic-interpretation/)
2. [SISR Version 1.0 publication history, W3C Standards](https://www.w3.org/standards/history/semantic-interpretation/)
3. [Semantic Interpretation for Speech Recognition (SISR) Is a W3C Recommendation, W3C News, 5 April 2007](https://www.w3.org/news/2007/semantic-interpretation-for-speech-recognition-sisr-is-a-w3c-recommendation/)
4. [Speech Recognition Grammar Specification Version 1.0, W3C Recommendation 16 March 2004](https://www.w3.org/TR/speech-grammar/)
5. [Semantic interpretation, Reconhecimento de Fala 3.1.0 documentation, CPQD](https://speechweb.cpqd.com.br/asr/docs/3.1.0/en-us/user_guide/grammar_dev/sema.html)
6. [W3C Semantic Interpretation for Speech Recognition (Loquendo tutorial), CiteSeerX](https://citeseerx.ist.psu.edu/document?doi=4b4051d31752496774c860553def3226bf5416e4&repid=rep1&type=pdf)
7. [Voice Extensible Markup Language (VoiceXML) Version 2.0, W3C Recommendation](https://www.dejavu.org/cgi-bin/get.cgi?url=https%3A%2F%2Fwww.w3.org%2FTR%2Fvoicexml20%2F%23dmlAAccessibility&ver=95)
8. [W3C Issues New Standards for Voice-driven Web Applications, W3C news mailing list, 19 June 2007](https://lists.w3.org/Archives/Public/w3c-news/2007AprJun/0005.html)
9. [The Role and Importance of Speech Standards (book chapter)](https://www.ndl.ethernet.edu.et/bitstream/123456789/72620/1/133.pdf.pdf)
10. [Semantic Interpretation for Speech Recognition (SISR) Version 1.0 Implementation Report, W3C](https://www.w3.org/Voice/2007/sisr-ir/)
11. [Grammar file standards, Nuance Speech Suite documentation](https://docs.nuance.com/speech-suite/nr-gram/nrg_basic_writing_standards.html)
12. [Microsoft Speech API (SAPI) 5.3, Microsoft Learn](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/ms723627%28v%3Dvs.85%29)
13. [SemanticValue Class (System.Speech.Recognition), Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/api/system.speech.recognition.semanticvalue?view=net-10.0)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 25, 2026 · Edited: Oct 11, 2026; Oct 15, 2026; Oct 25, 2026 · Last review: Oct 25, 2026*

Topic: 社会与历史 › 语言与语言学 › 语言学 › 形式与计算语言学 › 语音识别语法标准

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/semantic-interpretation-for-speech-recognition

English original: https://www.edgepedia.org/semantic-interpretation-for-speech-recognition
