请查看 勘误表 以获取自发布以来报告的任何错误或问题。
另请参见 翻译。
本文档还提供以下非规范格式: EPUB
Copyright © 2019-2020 W3C® (MIT, ERCIM, Keio, Beihang). W3C liability, trademark and permissive document license rules apply.
本规范描述了创建有声读物的要求,使用 Publication Manifest 规范的一个配置文件。
本文档描述了在发布时该文档的状态。其他文档可能会取代本文档。当前 W3C 发布列表以及该技术报告的最新版本可以在 W3C 技术报告索引 https://www.w3.org/TR/ 中找到。
本文档由 出版工作组 作为推荐标准发布。
GitHub Issues 优先用于讨论本规范。 也可以将意见发送到邮件列表 public-publ-wg@w3.org(存档)。
W3C 推荐标准是在广泛共识基础上获得 W3C 及其成员认可的规范。W3C 推荐将此规范作为 Web 标准广泛部署。未来更新可能会加入 新特性。
本文档依据 2017年8月1日 W3C 专利政策 发布。W3C 维护与该工作组交付物相关的 专利披露公开列表。
本文档遵循 2020年9月15日 W3C 流程文档。
本节为非规范性。
有声读物是由音频资源组成的集合,这些资源通过阅读顺序、元数据以及资源本身进行组织,并全部包含在一个清单中。该有声读物可以存在于开放 Web 平台上,也可以作为一个打包实体存在。
本规范旨在标准化有声读物在 Web 及不同商业系统之间的分发模型。它应支持不同用户代理架构来消费有声读物。本规范的主要目标是为当前缺乏标准支持的出版行业领域提供清晰定义,同时将有声读物引入开放 Web 平台及新型用户代理。本规范不规定内容创作者应使用何种文件类型或格式,而仅定义用于交付这些资源的清单格式。
本规范不定义用户代理应如何渲染有声读物。关于用户代理可提供哪些阅读体验增强能力的细节,定义在 [pwp-ucr] 中。
在本文档中,出版行业中特定含义的术语以大写形式表示(例如“Reading System”)。这些术语的完整列表及定义见 [pub-manifest]。
只有每个章节中术语的第一次出现会链接到其定义。
此外,本文档还定义以下术语:
补充内容是指与有声读物内容相关但不是完整阅读体验所必需的任何内容。补充内容示例包括与有声读物主题相关的照片、图表或数据等。
除标记为非规范性的章节外,本规范中的所有作者指南、图示、示例和注释均为非规范性。本规范其余部分均为规范性内容。
本文档中的关键词 MAY、MUST、MUST NOT、RECOMMENDED、REQUIRED 和 SHOULD 应按照 BCP 14 [RFC2119] [RFC8174] 中所描述的方式解释,仅当这些词以全大写形式出现时适用。
主入口页面 是一个 HTML 资源,表示有声读物的首选起始资源,并支持其清单的发现。它通常用于介绍该有声读物并提供内容访问入口。
主入口页面 MUST 包含指向清单的链接或嵌入清单 [pub-manifest]。它还 SHOULD 包含目录。
除非打包机制提供了替代的清单发现方式,否则有声读物 MUST 包含主入口页面。当存在该页面时,它 MUST 被包含在资源列表中。
目录提供一个分层链接列表,用于表示有声读物主要章节结构及其可能包含的补充内容。
目录通过一个 [html] 元素(通常是 nav 元素)表达,并且必须通过 role 属性的值
"doc-toc" 标识 [dpub-aria-1.0]。
如果目录位于主入口页面中,则该目录在文档树顺序中 MUST 为第一个具有该 role 值的元素。否则,清单 SHOULD 指明包含该结构的资源。
当有声读物包含额外资源(即补充内容)时:
应包含目录;
目录 SHOULD 包含指向所有资源的链接;并且
所有链接 SHOULD 指向出版资源 [pub-manifest]。
当包含补充内容时,请注意用户可能无法访问这些内容,除非它们从目录中被链接。强烈建议为所有不在默认阅读顺序中的内容提供链接。
有关目录结构和格式的更多指导,请参阅 Publication Manifest - 可机器处理的目录 [pub-manifest]。
本节为非规范性内容。
有声读物清单由一组属性定义,这些属性描述了用户代理处理和呈现有声读物所需的基础信息。这些属性在 Publication Manifest [pub-manifest] 中分类。本节说明这些属性如何从 Publication Manifest 扩展而来。
有声读物清单被定义为一种特定“形态”的 [json-ld11]。该形态也通过 JSON schema(非正式)定义,用于表达本规范中的约束。该 schema 维护在 https://www.w3.org/ns/pub-schema/audiobooks/。
有声读物属性与资源关系的表达要求如下:
属性列表使用 [schema.org] 和 [pub-manifest] 中定义的正式名称。括号中的说明用于解释用途。
conformsTo
@context
readingOrder
name
(出版物标题)
部分属性在未显式声明时可由其他信息推导得到。更多信息参见内部表示数据模型 [pub-manifest](有声读物实现仅在 type 默认值上有所不同)。
有声读物清单必须首先设置 JSON-LD 上下文 [json-ld]。该 上下文包含以下两个主要组成部分:
https://schema.orghttps://www.w3.org/ns/pub-context{
"@context" : ["https://schema.org", "https://www.w3.org/ns/pub-context"],
…
}
要为清单元数据添加全局语言和方向,也可以将语言和方向 声明 [pub-manifest] 添加到上下文中:
{
"@context" : [
"https://schema.org",
"https://www.w3.org/ns/pub-context",
{"language":"fr"}
]
…
}
在 conformsTo
术语中表达的一致性 URL [pub-manifest] MUST 为
"https://www.w3.org/TR/audiobooks/"。
{
"@context" : ["https://schema.org", "https://www.w3.org/ns/pub-context"],
"conformsTo" : "https://www.w3.org/TR/audiobooks/"
…
}
出版类型使用 type
术语定义 [pub-manifest]。
{
"@context" : ["https://schema.org", "https://www.w3.org/ns/pub-context"],
"type" : "Audiobook"
…
}
如果未指定 type,则默认假定为 Audiobook [schema.org]。
创作者是负责创作有声读物的个人或实体。有声读物配置文件可以使用 [pub-manifest] 中定义的完整创作者列表。
创作者列表包含两个推荐用于有声读物的创作者:
{
"conformsTo" : "https://www.w3.org/TR/audiobooks/",
"@context" : ["https://schema.org","https://www.w3.org/ns/pub-context"],
"type" : "Audiobook",
…
"url" : "https://publisher.example.org/janeeyre",
"author" : {
"type" : "Person",
"name" : "Charlotte Bronte"
}
}
{
"conformsTo" : "https://www.w3.org/TR/audiobooks/";
"@context": ["https://schema.org", "https://www.w3.org/ns/pub-context"],
…
"url" : "https://publisher.example.org/janeeyre",
"author" : {
"type": "Person",
"name": "Charlotte Bronte"
}
"readBy" : {
"type": "Person",
"name": "Ivan Herman",
"id" : "https://www.w3.org/People/Ivan/"
}
}
时长是有声读物中音频资源的长度。duration 属性在 Publication Manifest [pub-manifest] 中完整定义。
时长 SHOULD 作为清单的一部分为整个有声读物表达, 并且 SHOULD 出现在默认阅读顺序中的条目级别。
当内容创作者同时在 默认阅读顺序中指定有声读物的总时长和条目级时长时,资源级时长 SHOULD 等于阅读顺序中各条目时长的总和。
{
"conformsTo" : "https://www.w3.org/TR/audiobooks/",
"@context" : ["https://schema.org","https://www.w3.org/ns/pub-context"],
…
"url" : "https://publisher.example.org/janeeyre",
"author" : {
"type" : "Person",
"name" : "Charlotte Bronte"
},
"duration" : "PT12345.235S"
}
默认阅读顺序 [pub-manifest] 是穿过有声读物中音频资源的特定进程。
默认阅读顺序 MUST 至少包含一个音频资源,该资源
MAY 由 LinkedResource
[pub-manifest] 的 type 标识。默认阅读顺序
MUST NOT 包含非音频资源。
音频资源可以通过 URL [url] 作为整体引用; 对于多个章节占用单个文件的内容,也可以使用媒体片段 [media-frags] 来定位确切的起点和终点。
注释也可以使用媒体片段来标识注释在资源中的位置,并且与 Web Annotations 模型兼容。此方法仅适用于未打包的有声读物清单。
{
"@context" : ["https://schema.org", "https://www.w3.org/ns/pub-context"],
"conformsTo" : "https://www.w3.org/TR/audiobooks/",
"url" : "https://publisher.example.org/janeeyre",
"name" : "Jane Eyre",
"readingOrder" : [{
"type" : "LinkedResource",
"url" : "audio/janeeyre.mp3",
"encodingFormat" : "audio/mp3",
"name" : "Jane Eyre",
"duration" : "PT124503.123S"
}]
}
{
"@context" : ["https://schema.org", "https://www.w3.org/ns/pub-context"],
"conformsTo" : "https://www.w3.org/TR/audiobooks/",
"url" : "https://publisher.example.org/janeeyre",
"name" : "Jane Eyre",
"readingOrder" : [{
"type": "LinkedResource",
"url" : "audio/part001.wav#t=0,457.931",
"encodingFormat" : "audio/vnd-wav",
"name" : "Chapter 1",
"duration" : "PT457.931S"
}, {
"type" : "LinkedResource",
"url" : "audio/part002.wav#t=12.741",
"encodingFormat" : "audio/vnd-wav",
"name" : "Chapter 2",
"duration" : "PT234.245S"
}]
}
资源列表枚举用于处理和呈现有声读物、但未列在阅读顺序中的任何附加资源。它使用
resources 属性表达。
如果有声读物包含补充内容,则该内容 MUST 在资源列表中引用。
{
"@context" : ["https://schema.org", "https://www.w3.org/ns/pub-context"],
"conformsTo" : "https://www.w3.org/TR/audiobooks/",
"url" : "https://publisher.example.org/janeeyre",
"name" : "Jane Eyre",
"resources" : [
"cover.jpg",
"portrait_CB.jpg",
"supplement.pdf"
]
}
预览是用户在购买或下载完整有声读物之前体验完整内容的一种常见方式。
预览使用
preview 链接关系标识,如 [pub-manifest] 中所定义。
预览 MAY 位于外部,或作为有声读物的资源包含其中。
{
"@context" : ["https://schema.org", "https://www.w3.org/ns/pub-context"],
"conformsTo" : "https://www.w3.org/TR/audiobooks/",
"url" : "https://publisher.example.org/janeeyre",
"name" : "Jane Eyre",
"resources" : [{
"type" : "LinkedResource",
"url" : "https://publisher.example.org/jane-eyre-preview.wav",
"encodingFormat" : "audio/wav",
"rel" : "preview"
}]
}
{
"@context" : ["https://schema.org", "https://www.w3.org/ns/pub-context"],
"conformsTo" : "https://www.w3.org/TR/audiobooks/",
"url" : "https://publisher.example.org/janeeyre",
"name" : "Jane Eyre",
"resources" : [{
"type" : "LinkedResource",
"url" : "preview.wav",
"encodingFormat" : "audio/wav",
"rel" : "preview"
}]
}
本节为非规范性内容。
有声读物将使用 Lightweight Packaging Format [lpf] 说明中描述的方法打包。
本节为非规范性内容。
有声读物的历史根植于可访问性领域。纯音频出版物以及同步文本与音频播放的出版物长期以来都用于帮助有替代阅读需求和偏好的用户。
一种面向出版物的可访问同步媒体方法目前正由 Synchronized Multimedia for Publications Community Group 推进。有关创建此类内容并将其纳入有声读物的更多信息,请参阅该组的工作。
或者,内容创作者可以在 resources 中提供作为 HTML [html] 资源的等效文本。
{
"@context" : ["https://schema.org", "https://www.w3.org/ns/pub-context"],
"conformsTo" : "https://www.w3.org/TR/audiobooks/",
"url" : "https://publisher.example.org/janeeyre",
"name" : "Jane Eyre",
"readingOrder" : {
"type" : "LinkedResource",
"url" : "audio/part001.wav#t=0",
"encodingFormat" : "audio/vnd-wav",
"name" : "Chapter 1",
"duration" : "PT457.931S",
"alternate" : {
"type" : "LinkedResource",
"url" : "text/part001-1.html",
"encodingFormat" : "text/html"},
},
"resources" : [{
"type": "LinkedResource",
"url": "text/part001-1.html",
"encodingFormat" : "text/html"
}…
]
}
本节依赖于 Infra Standard [infra]。
本规范按如下方式扩展了 Publication Manifest 的处理 算法 [pub-manifest]:
为有声读物清单添加以下扩展 步骤:
(§ 5.6.2 时长)按如下方式检查出版物的时长:
令 resourceDuration 保存各个资源的总时长。
对 data["readingOrder"] 中的每个 resource 执行遍历:
如果未定义 resource["duration"],则为验证 错误。
否则,如果存在 resource["duration"],则将 resource["duration"] 加到 resourceDuration。
如果由于未设置 data["duration"] 而无法比较这些值,则为 验证 错误。
否则,如果 resourceDuration 未指定与 data["duration"] 相同的总时长,则为验证 错误。
此步骤会同时检查阅读顺序中的所有资源是否都指定了时长,以及这些时长的总和是否与出版物的总时长匹配。
只有在检查每个资源时,若资源未指定时长,才会发出验证错误。时长的 有效性 [pub-manifest] 已在 Publication Manifest 算法中检查,因此无需重复检查。
为有声读物清单添加以下扩展 步骤:
(§ 5.7 默认阅读顺序)按如下方式检查阅读顺序:
如果未设置 data["readingOrder"],则为致命 错误。
对 data["readingOrder"] 中的每个 resource 执行遍历,如果 resource 不是音频资源,则为验证 错误,并从 data["readingOrder"] 中移除 resource。
此步骤确保阅读顺序中只列出音频资源,并移除任何非音频资源。
如果检查每个资源后阅读顺序不包含任何条目,则返回致命错误,因为该出版物不是有效的有声读物。
(§ 5.5 出版
类型)如果未设置 data["type"] 或其为空列表,则为验证
错误,并将其设置为 « "Audiobook" »。
此步骤在未指定 type 属性时,将出版物的默认类型设置为 Audiobook。
(§ 5.2 要求)检查以下每个属性是否已设置。如果没有,则分别发出一个验证 错误。
此步骤检查所有推荐属性是否都已设置。有关这些属性的更多信息,请参阅 § 5.2 要求。
(§ 5.2
要求)如果 data["readingOrder"] 或
data["resources"] 中没有任何资源具有一个 rel
条目且该条目包含关系
cover,则为验证
错误。
此步骤检查阅读顺序和资源列表,以验证是否已指定封面(即某个资源在其
rel 属性中具有 cover 值)。
本节为非规范性内容。
本规范扩展了 Publication Manifest 的用户代理处理算法,用于按如下方式定位可机器处理目录 [pub-manifest] 的目录 元素:
更多细节另见 § 4.2 目录。
由于 Audiobooks 是 Publication Manifest [pub-manifest] 的一个配置文件,该规范中详述的所有安全与隐私考量 都适用于本配置文件。
本配置文件承认以下考量:
本节为非规范性内容。
本节概述实现有声读物时预期的用户代理行为。有关处理
指令,用户代理应参考 Publication Manifest [pub-manifest] 规范的处理
清单一节,并遵循其中描述的任何行为。
本节描述的所有用户代理行为旨在为实现者提供指导,而不是严格要求。本文档中的行为主要取自工作组发布的 Use Cases and Requirements [pwp-ucr] 说明。
如 Use Cases and Requirements [pwp-ucr] 说明所述,有声读物必须能在用户代理中导航。这意味着用户代理必须提供方法,使用户能够通过无缝地沿阅读顺序移动,或通过访问目录,以线性或非线性方式浏览有声读物。用户代理还应允许用户以较短时间增量在单个 音频文件中移动。
对于有声读物,用户代理应提供一个播放器 接口 [pwp-ucr],使用户能够导航、播放或暂停有声读物。该接口可以以任何方式呈现给用户(即物理按钮、视觉界面、键盘输入或语音命令),但应能在听读体验的任何时刻访问。
Use Cases and Requirements [pwp-ucr] 说明建议内容应可离线使用,并且任何打包格式都不应影响出版物的各次迭代。这意味着,即使内容通过多个用户代理被复制多次并分发给许多用户,核心清单及其标识符也永远不会改变。
本规范建议使用 Lightweight Packaging Format [lpf] 来打包有声读物内容,但这不是一项要求。有声读物用户代理应能够摄取 LPF 文件以供播放,并应根据本文档中的要求和建议显示内容。
如果用户代理直接从其服务提供内容(即作为零售商或内容库),建议其为用户提供离线化或下载内容的方法。格式可由其自行选择,但有声读物应完整且有效,并且清单中列出的内容应完整提供。即使用户代理不支持显示某个资源(即图像文件或数据表),也仍应使用户能够下载该资源。
本规范不提供内容创作者保护其内容或为其内容加水印的方法,因为当前市场中已有可用方法。与希望保护或限制其内容分发的内容创作者合作的用户代理,可以选择最适合其需求的方法。
本规范建议并提供一种方法,使内容创作者能够创建完全可访问的有声读物。用户代理应使用可访问性一节中的这些信息来实现可访问的有声读物界面。建议用户代理提供可访问的播放器界面,并为提供了
alternate 内容的内容创作者提供显示该内容的方法。
自首份公开 工作草案以来的实质性变更:
有关已处理议题的完整列表,请参阅 GitHub 跟踪器。
本节为非规范性内容。
有声读物的清单。此清单的规范 版本也可用。
{
"@context": ["https://schema.org", "https://www.w3.org/ns/pub-context"],
"conformsTo" : "https://www.w3.org/TR/audiobooks/",
"type": "Audiobook",
"id": "https://librivox.org/flatland-a-romance-of-many-dimensions-by-edwin-abbott-abbott/",
"url": "https://w3c.github.io/wpub/experiments/audiobook/",
"name": "Flatland: A Romance of Many Dimensions",
"author": "Edwin Abbott Abbott",
"readBy": "Ruth Golding",
"publisher": "Librivox",
"inLanguage": "en",
"dateModified": "2018-06-14T19:32:18Z",
"datePublished": "2008-10-12",
"duration": "PT15153S",
"license": "https://creativecommons.org/publicdomain/zero/1.0/",
"resources": [
{
"rel": "cover",
"url": "http://ia800704.us.archive.org/9/items/LibrivoxCdCoverArt12/Flatland_1109.jpg",
"encodingFormat": "image/jpeg"
},{
"rel": "contents",
"url": "toc.html",
"encodingFormat": "text/html"
}
],
"readingOrder": [
{
"url": "http://www.archive.org/download/flatland_rg_librivox/flatland_1_abbott.mp3",
"encodingFormat": "audio/mpeg",
"duration": 1371,
"name": "Part 1, Sections 1 - 3"
},{
"url": "http://www.archive.org/download/flatland_rg_librivox/flatland_2_abbott.mp3",
"encodingFormat": "audio/mpeg",
"duration": 1669,
"name": "Part 1, Sections 4 - 5"
},{
"url": "http://www.archive.org/download/flatland_rg_librivox/flatland_3_abbott.mp3",
"encodingFormat": "audio/mpeg",
"duration": 1506,
"name": "Part 1, Sections 6 - 7"
},{
"url": "http://www.archive.org/download/flatland_rg_librivox/flatland_4_abbott.mp3",
"encodingFormat": "audio/mpeg",
"duration": 1669,
"name": "Part 1, Sections 8 - 10"
},{
"url": "http://www.archive.org/download/flatland_rg_librivox/flatland_5_abbott.mp3",
"encodingFormat": "audio/mpeg",
"duration": 1506,
"name": "Part 1, Sections 11 - 12"
},{
"url": "http://www.archive.org/download/flatland_rg_librivox/flatland_6_abbott.mp3",
"encodingFormat": "audio/mpeg",
"duration": 1798,
"name": "Part 2, Sections 13 - 14"
},{
"url": "http://www.archive.org/download/flatland_rg_librivox/flatland_7_abbott.mp3",
"encodingFormat": "audio/mpeg",
"duration": 1225,
"name": "Part 2, Sections 15 - 17"
},{
"url": "http://www.archive.org/download/flatland_rg_librivox/flatland_8_abbott.mp3",
"encodingFormat": "audio/mpeg",
"duration": 1371,
"name": "Part 2, Sections 18 - 20"
},{
"url": "http://www.archive.org/download/flatland_rg_librivox/flatland_9_abbott.mp3",
"encodingFormat": "audio/mpeg",
"duration": 1659,
"name": "Part 2, Sections 21 - 22"
}
]
}
带补充内容的有声读物清单。
{
"@context" : ["https://schema.org", "https://www.w3/org/ns/pub-context"],
"conformsTo" : "https://www.w3.org/TR/audiobooks/",
"id" : "https://publisher.example.com/janeeyre",
"url" : "https://publisher.example.com/janeeyre",
"name" : "Jane Eyre",
"author" : "Charlotte Bronte",
"readBy" : "Jane Doe",
"duration" : "PT123456.789S",
"abridged" : false,
"inLanguage" : "en",
"dateModified" : "2019-03-29T15:59:00Z",
"datePublished" : "2019-03-29",
"readingOrder": [
{"url": "audio/chapter001.aac", "encodingFormat": "audio/aac", "name": "Chapter 1", "duration": "PT1234.567S"},
{"url": "audio/chapter002.aac", "encodingFormat": "audio/aac", "name": "Chapter 2", "duration": "PT890.123S"},
{"url": "audio/chapter003.aac", "encodingFormat": "audio/aac", "name": "Chapter 3", "duration": "PT456.789S"},
{"url": "audio/chapter004.aac", "encodingFormat": "audio/aac", "name": "Chapter 4", "duration": "PT987.654S"},
{"url": "audio/chapter005.aac", "encodingFormat": "audio/aac", "name": "Chapter 5", "duration": "PT321.987S"}
],
"resources": [
{"rel": "cover", "url": "images/cover.jpg", "encordingFormat": "image/jpeg"},
{"rel": "contents", "url": "toc.html", "encodingFormat": "text/html"},
{"url": "haworth_house.pdf", "encodingFormat": "application/pdf"}
]
}
本节为非规范性内容。
带有简单有声读物目录的主入口页面。
<head>
…
<script type="application/ld+json">
{
"@context" : ["https://schema.org","https://www.w3.org/ns/pub-context"],
"conformsTo" : "https://www.w3.org/TR/audiobooks/",
…
"url" : "https://publisher.example.org/janeeyre",
…
}
</script>
…
</head>
<body>
…
<section role="doc-toc">
<ol>
<li><a href="audio/chapter001.wav">Chapter 1. There was no possibility of taking a walk that day...</a></li>
<li><a href="audio/chapter002.wav">Chapter 2. I resisted all the way:...</a></li>
<li><a href="audio/chapter003.wav">Chapter 3. The next thing I remember is,...</a></li>
…
</ol>
</section>
…
</body>
简单有声读物的目录。
<nav role="doc-toc">
<h2>JANE EYRE</h2>
<ol>
<li><a href="audio/chapter001.mp3">Chapter 1. There was no possibility of taking a walk that day...</a></li>
<li><a href="audio/chapter002.mp3">Chapter 2. I resisted all the way:...</a></li>
<li><a href="audio/chapter003.mp3">Chapter 3. The next thing I remember is,...</a></li>
…
</ol>
</nav>
使用媒体片段引用来指向单个音轨中位置的目录。
<nav role="doc-toc">
<h2>JANE EYRE</h2>
<ol>
<li><a href="https://example.publisher.org/janeeyre/part001.mp3#t=0,456.788">Chapter 1</a></li>
<li><a href="https://example.publisher.org/janeeyre/part001.mp3#t=456.789,1234.566">Chapter 2</a></li>
<li><a href="https://example.publisher.org/janeeyre/part001.mp3#t=1234.567">Chapter 3</a></li>
</ol>
</nav>
本节为非规范性内容。
编辑谨感谢出版工作组成员对本规范的贡献:
工作组还要感谢 Digital Publishing Interest Group 成员,他们为本规范铺平道路付出了大量努力。