-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
executable file
·4134 lines (3956 loc) · 229 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="color-scheme" content="light dark">
<title>Dubbing and Audio description Profiles of TTML2</title>
<script defer src="https://www.w3.org/Tools/respec/respec-w3c" class="remove"></script>
<script class="remove">
// Rather than include the version control system (VCS) URL, use the Respec config value
function replaceVCS(config) {
document.querySelectorAll(".pp-vcs").forEach((element) =>
element.href=config.github.repoURL)
}
var respecConfig = {
// specification status (e.g. WD, LCWD, NOTE, etc.). If in doubt use ED.
specStatus: "ED",
// the specification's short name, as in https://www.w3.org/TR/short-name/
shortName: "dapt",
// if there a publicly available Editor's Draft, this is the link
edDraftURI: "https://w3c.github.io/dapt/",
// editors, add as many as you like
// only "name" is required
editors: [
{ name: "Cyril Concolato", w3cid: "36324", mailto: "[email protected]", url: "", company: "Netflix", companyURL: "https://www.netflix.com/"},
{ name: "Nigel Megitt", w3cid: "64750", mailto: "[email protected]", url: "", company: "British Broadcasting Corporation", companyURL: "https://www.bbc.co.uk"},
],
// name of the WG
group: "wg/timed-text",
github: "w3c/dapt",
wgPublicList: "public-tt",
license: "document",
// local bibliography
localBiblio: {
"BBC-WHP051": {
title: "BBC R&D White Paper WHP 051. Audio Description: what it is and how it works",
publisher: "N.E. Tanton, T. Ware and M. Armstrong",
status: "October 2002 (revised July 2004)",
href: "http://www.bbc.co.uk/rd/publications/whitepaper051",
},
"EBU-R37": {
title: "EBU Recommendation R37-2007. The relative timing of the sound and vision components of a television signal",
publisher: "EBU/UER",
status: "February 2007",
href: "https://tech.ebu.ch/publications/r037"
},
"EBU-TT-3390": {
title: "EBU-TT Part M, Metadata Definitions",
publisher: "EBU/UER",
status: "May 2017",
href: "https://tech.ebu.ch/publications/tech3390"
},
"I18N-INLINE-BIDI": {
title: "Inline markup and bidirectional text in HTML",
publisher: "W3C",
status: "2021-06-25",
href: "https://www.w3.org/International/articles/inline-bidi-markup"
},
"TTML2": {
title: "Timed Text Markup Language 2 (TTML2) (2nd Edition)",
publisher: "W3C",
status: "2021-03-09",
href: "https://www.w3.org/TR/2021/CR-ttml2-20210309"
},
},
postProcess: [
replaceVCS,
]
};
</script>
<style>
@media (prefers-color-scheme: dark) {
.data tr:nth-child(even) {
background: #444444;
}
span.label.required::before, span.label.required::after {
color: black;
}
span.optional {
color: black;
background-color: #FFFF50;
border-color: #f0f6ff;
}
span.permitted {
color: black;
background-color: #50FF50;
}
span.prohibited {
color: black;
background-color: #FF5F5F;
}
span.permitted-deprecated {
color: black;
background-color: #FFC000;
}
span.required {
color: black;
background-color: white;
}
img.fingerprint, svg {
filter: invert(100%);
}
div.exampleInner {
background-color: #282c34;
}
}
@media (prefers-color-scheme: light) {
.data tr:nth-child(even) {
background: #f0f6ff;
}
span.label.required::before, span.label.required::after {
color: white;
}
span.optional {
color: black;
background-color: #FFFF50;
border-color: #444444;
}
span.permitted {
color: black;
background-color: #50FF50;
}
span.prohibited {
color: black;
background-color: #FF5F5F;
}
span.permitted-deprecated {
color: black;
background-color: #FFC000;
}
span.required {
color: white;
background-color: black;
}
div.exampleInner {
background-color: #fafafa;
}
}
table.coldividers td + td { border-left:1px solid gray; }
table.syntax { border: 0px solid black; width: 85%; border-collapse: collapse }
table.syntax caption { font-weight: bold; text-align: left; padding-bottom: 0.5em }
table.syntax th { border: 0px solid black; text-align: left }
table.syntax td { border: 0px solid black }
table.syntax div { background-color: #ffffc8 }
table#table-features-and-extensions tbody tr td:nth-child(2) { text-align: center;}
td.table-row-header {text-align:center; font-style: italic; font-weight: bold; padding-top: 1.5rem !important;}
div.exampleInner { border-top-width: 4px;
border-top-style: double;
border-top-color: #d3d3d3;
border-bottom-color: #d3d3d3;
border-bottom-width: 4px;
border-bottom-style: double;
padding: 4px; margin: 0em }
ul.short-list { margin: 0; padding-left: 0; list-style-position: inside;}
.equation {text-indent: 10%;}
.example pre {font-size: small}
.deprecation {background-color: #EBEBFE; border: 3px double; margin: 2px;}
.deprecation::before {content: "\26A0"; margin:0.2em; font-size:2em; float:left;}
body {
font-family: sans-serif;
line-height: 24px;
}
img.fingerprint {
float: left;
margin-left: -2rem;
max-height: 2rem;
}
span.label {
display: inline-block;
border-radius: 3px;
}
span.optional::before {
content: "\00A0?\00A0";
font-weight: bold;
}
span.permitted::before {
content: "\00A0\2713\00A0";
}
span.prohibited::before {
content: "\00A0\2718\00A0";
}
span.permitted-deprecated::before {
font-weight: bold;
content: "\00A0!\00A0";
}
span.label.required::before, span.label.required::after {
font-weight: bold;
content: "\00A0!!\00A0";
}
span.label::after {
content: "\00A0";
}
span.optional {
border-style: solid;
border-width: 1px;
}
figure svg {
max-width: max-content !important;
}
.registry-table-section::after, .registry-table-section::before, .registry-table-section > .marker {
color: #444444;
background: rgb(224, 251, 251);
display: block;
text-transform: uppercase;
margin-left: -0.5em;
margin-right: -0.5em;
padding: 0.5em;
}
.registry-table-section::before, .registry-table-section > .marker {
content: 'Registry table section begins';
margin-top: -0.5em;
margin-bottom: 0.5em;
}
.registry-table-section::after {
content: 'Registry table section ends';
margin-top: 0.5em;
margin-bottom: -0.5em;
}
.registry-table-section {
padding: .5em;
border: .5em;
border-left-style: solid;
page-break-inside: avoid;
margin: 1em auto;
border-left-width: 0.5em;
border-left-style: solid;
border-right-width: 0.5em;
border-right-style: none;
border-color: #52e0e0;
overflow: visible;
clear: both;
}
.registry-table-section a.self-link::before {
left: -1.1em;
position: relative;
}
</style>
</head>
<body>
<h1 id="title">Dubbing and Audio description Profiles of TTML2</h1>
<section id="abstract">
This specification defines <abbr title="Dubbing and Audio description Profiles of TTML2">DAPT</abbr>, a <abbr title="Timed Text Markup Language">TTML</abbr>-based file format for the exchange of timed text content in dubbing and audio description workflows.
</section>
<section id="sotd" class="updateable-rec">
<p>This document incorporates a <dfn data-cite="w3c-process#registry-section">registry section</dfn>
and defines <dfn data-cite="w3c-process#registry-table">registry tables</dfn>,
as defined in the [[w3c-process]] requirements for <a>w3c registries</a>.
Updates to the document that only change <a>registry tables</a> can be made
without meeting other requirements for Recommendation track updates,
as set out in <dfn data-cite="w3c-process#reg-table-update">Updating Registry Tables</dfn>;
requirements for updating those registry tables are normatively specified
within <a href="#registry-section"></a>.</p>
<p>A list of the substantive changes applied since the
<a href="https://www.w3.org/TR/2023/WD-dapt-20230425/">initial Working Draft</a> is found at
<a href="substantive-changes-summary.txt">substantive-changes-summary.txt</a>.</p>
<p>The Working Group has identified the following
<dfn data-cite="w3c-process/#at-risk">at risk</dfn> features:</p>
<div class="issue" data-number="218"></div>
<div class="issue" data-number="219"></div>
<div class="issue" data-number="220"></div>
<div class="issue" data-number="221"></div>
<div class="issue" data-number="222"></div>
<div class="issue" data-number="223"></div>
<div class="issue" data-number="224"></div>
<div class="issue" data-number="239"></div>
<p><a>At risk</a> features may be be removed before advancement to Proposed Recommendation.</p>
</section>
<section>
<h2>Scope</h2>
<p>This specification defines a text-based profile of the Timed Text Markup Language version 2.0 [[TTML2]]
intended to support <a>dubbing</a> and <a>audio description</a> workflows worldwide,
to meet the requirements defined in [[?DAPT-REQS]], and to permit usage of visual presentation
features within [[TTML2]] and its profiles, for example those in [[TTML-IMSC1.2]].</p>
</section>
<section class="informative">
<h2>Introduction</h2>
<section>
<h3>Transcripts and Scripts</h3>
<p>In general usage, one meaning of the word <em>script</em> is
the written text of a film, television programme, play etc.
A script can be either a record of the completed production,
also known as a transcript,
or as a plan for a yet to be created production.
In this document, we use domain-specific terms, and define more specifically that:</p>
<ul>
<li>a <dfn>transcript</dfn> is the text representation of <em>pre-existing</em> media in another form,
for example the dialogue in a video;</li>
<li>a <dfn>script</dfn> is a text representation of the <em>intended</em> content of media prior to its creation,
for example to guide an actor in recording an audio track.</li>
</ul>
<p>The term <a>DAPT script</a> is used generically to refer to both <a>transcripts</a> and <a>scripts</a>,
and is a point of conformance to the formal requirements of this specification.
<a>DAPT Scripts</a> consist of timed text and associated metadata,
such as the character speaking.</p>
<p>In dubbing workflows, a <a>transcript</a> is generated and translated to create a <a>script</a>.
In audio description workflows, a <a>transcript</a> describes the video image,
and is then used directly as a <a>script</a> for recording an audio equivalent.
</p>
<p>DAPT is a TTML-based format for the exchange of <a>transcripts</a> and <a>scripts</a>
(i.e. <a>DAPT Scripts</a>)
among authoring, prompting and playback tools in the localization and <a>audio description</a> pipelines.
A <a>DAPT document</a> is a serializable form of a <a>DAPT Script</a> designed to carry pertinent information for dubbing or <a>audio description</a>
such as type of <a>DAPT script</a>, dialogue, descriptions, timing, metadata, original language transcribed text, translated text, language information, and audio mixing instructions,
and to be extensible to allow user-defined annotations or additional future features.</p>
<p>This specification defines the data model for <a>DAPT scripts</a> and
its representation as a [[TTML2]] document (see [[[#data-model]]])
with some constraints and restrictions (see [[[#profile-constraints]]]).</p>
<p>A <a>DAPT script</a> is expected to be used to make audio visual media accessible
or localized for users who cannot understand it in its original form,
and to be used as part of the solution for meeting user needs
involving <a>transcripts</a>, including accessibility needs described in [[media-accessibility-reqs]],
as well as supporting users who need dialogue translated into a different language via dubbing.</p>
<p>Every part of the <a>DAPT script</a> content is required
to be marked up with some indication of what it represents in the related media,
via the <a>Represents</a> property; likewise the <a>DAPT Script</a> as a whole
is required to list all the types of content that it represents,
for example if it represents audio content or visual content,
and if visual, then if it represents text or non-text etc.
A registry of hierarchical content descriptors is provided.</p>
<p>The authoring workflow for both dubbing and audio description involves similar stages,
that share common requirements as described in [[DAPT-REQS]].
In both cases, the author reviews the content and
writes down what is happening, either in the dialogue or in the video image,
alongside the time when it happens.
Further transformation processes can change the text to a different language and
adjust the wording to fit precise timing constraints.
Then there is a stage in which an audio rendering of the <a>script</a> is generated,
for eventual mixing into the programme audio.
That mixing can occur prior to distribution,
or in the player directly.</p>
<section>
<h4>Dubbing <a>scripts</a></h4>
<p>The <dfn>dubbing</dfn> process which consists in creating a <a>dubbing script</a>
is a complex, multi-step process involving:</p>
<ul>
<li>Transcribing and timing the dialogue in its own language from a completed programme to create a <a>transcript</a>;</li>
<li>Notating dialogue with character information and other annotations;</li>
<li>Generating localization notes to guide further adaptation;</li>
<li>Translating the dialogue to a target language <a>script</a>;</li>
<li>Adapting the translation to the dubbing;
for example matching the actor’s lip movements in the case of dubs.</li>
</ul>
<p>A <dfn>dubbing script</dfn> is a <a>transcript</a> or <a>script</a>
(depending on workflow stage) used for
recording translated dialogue to be mixed with the non-dialogue programme audio,
to generate a localized version of the programme in a different language,
known as a dubbed version, or dub for short.</p>
<p><a>Dubbing scripts</a> can be useful as a starting point for creation of subtitles or closed captions in alternate languages.
This specification is designed to facilitate the addition of, and conversion to,
subtitle and caption documents in other profiles of TTML, such as [[TTML-IMSC1.2]],
for example by permitting subtitle styling syntax to be carried in <a>DAPT documents</a>.
Alternatively, styling can be applied to assist voice artists when recording scripted dialogue.
</p>
</section> <!-- intro-dubbing -->
<section>
<h4>Audio Description <a>scripts</a></h4>
<p>Creating audio description content is also a multi-stage process.
An <dfn>audio description</dfn>,
also known as video description
or in [[media-accessibility-reqs]] as <a data-cite="media-accessibility-reqs#described-video">described video</a>,
is an audio service
to assist viewers who can not fully see a visual presentation to understand the content.
It is the result of mixing the <a>main programme audio</a> with the audio rendition of each <a>description</a>,
authored to be timed when it does not clash with dialogue,
to deliver an audio description mixed audio track.
<dfn>Main programme audio</dfn> refers to the audio associated with the programme prior to any further mixing.
A <dfn>description</dfn> is a set of words that describes an aspect of the programme presentation,
suitable for rendering into audio by means of vocalisation and recording
or used as a text alternative source for text to speech translation, as defined in [[WCAG22]].
More information about what <a>audio description</a> is and how it works can be found at [[BBC-WHP051]].
</p>
<p>Writing the audio description <a>script</a> typically involves:</p>
<ul>
<li>watching the video content of the programme,
or series of programmes,</li>
<li>identifying the key moments during which there is an opportunity to speak descriptions,</li>
<li>writing the description text to explain the important visible parts of the programme at that time,</li>
<li>creating an audio version of the descriptions, either by recording a human actor or using text to speech,</li>
<li>defining mixing instructions (applied using [[TTML2]] audio styling) for combining the audio with the programme audio.</li>
</ul>
<p>The audio mixing can occur prior to distribution of the media,
or in the client.
If the <a>audio description</a> <a>script</a> is delivered to the player,
the text can be used to provide an alternative rendering,
for example on a Braille display,
or using the user's configured screen reader.
</p>
</section> <!-- intro-audio-description -->
<section>
<h4>Other uses</h4>
<p>
<a>DAPT Scripts</a> can be useful in other workflows and scenarios.
For example, <a>Original language transcripts</a> could be used as:</p>
<ul>
<li>the output format of a speech to text system, even if not intended for translation,
or for the production of subtitles or captions;</li>
<li>a document known in the broadcasting industry as a "post production script",
used primarily for preview, editorial review and sales purposes;</li>
</ul>
<p>Both <a>Original language transcripts</a> and <a>Translated transcripts</a> could be used as:</p>
<ul>
<li>an accessible transcript presented alongside audio or video in a web page or application;
in this usage, the timings could be retained and used for synchronisation with,
or navigation within, the media
or discarded to present a plain text version of the entire timeline.</li>
</ul>
</section> <!-- intro-other-uses -->
</section> <!-- intro-overview -->
<section>
<h3>Example documents</h3>
<h4>Basic document structure</h4>
<p>The top level structure of a document is as follows:</p>
<ul>
<li>The <code><tt></code> root element in the namespace <code>http://www.w3.org/ns/ttml</code> indicates that this is a TTML document
and the <a><code>ttp:contentProfiles</code></a> attribute indicates that it adheres to the DAPT <a>content profile</a> defined in this specification.</li>
<li>The <code>daptm:scriptRepresents</code> attribute indicates what the contents of the document are an alternative for,
within the original programme.</li>
<li>The <code>daptm:scriptType</code> attribute indicates the type of <a>transcript</a> or <a>script</a>
but in this empty example, it is not relevant, since only the structure of the document is shown.</li>
<li>The <a><code>daptm:langSrc</code></a> attribute indicates the default text language source,
for example the original language of the content,
while the <code>xml:lang</code> attribute indicates the default language
in this script, which in this case is the same.
Both of these attributes are inherited and can be overridden within the content of the document.</li>
</ul>
<p>The structure is applicable to all types of <a>DAPT scripts</a>, dubbing or <a>audio description</a>.</p>
<pre class="example"
data-include="examples/intro-top-level.xml"
data-include-format="text">
</pre>
<p>The following examples correspond to the timed text <a>transcripts</a> and <a>scripts</a> produced
at each stage of the workflow described in [[DAPT-REQS]].</p>
<p>The first example shows an early stage <a>transcript</a> in which timed opportunities for descriptions
or transcriptions have been identified but no text has been written;
the <code>daptm:represents</code> attribute present on the <code><body></code>
element here is inherited by the <code><div></code> elements since
they do not specify a different value:</p>
<pre class="example"
data-include="examples/intro-times-only.xml"
data-include-format="text">
</pre>
<p>The following examples will demonstrate different uses in dubbing and audio description workflows.</p>
<h4>Audio Description Examples</h4>
<p>When descriptions are added this becomes a <a>Pre-Recording Script</a>.
Note that in this case, to reflect that most of the audio description content
transcribes the video image where there is no inherent language,
the <a>Text Language Source</a>, represented by the <a><code>daptm:langSrc</code></a> attribute,
is set to the empty string at the top level of the document.
It would be semantically equivalent to omit the attribute altogether,
since the default value is the empty string:</p>
<pre class="example"
data-include="examples/intro-times-and-text.xml"
data-include-format="text">
</pre>
<p>After creating audio recordings, if not using text to speech, instructions for playback
mixing can be inserted. For example, The gain of "received" audio can be changed before mixing in
the audio played from inside the <code><span></code> element, smoothly
animating the value on the way in and returning it on the way out:
</p>
<pre class="example"
data-include="examples/intro-script-with-gain.xml"
data-include-format="text">
</pre>
<p>At the document level, the <code>daptm:scriptRepresents</code> attribute indicates
that the document represents both visual text and visual non-text content in the
related media.
It is possible that there are no Script Events that actually represent visual text,
for example because there is no text in the video image.</p>
<p>In the above example, the <code><div></code> element's
<code>begin</code> attribute defines the time that is the "syncbase" for its child,
so the times on the <code><animate></code> and <code><span></code>
elements are relative to 25s here.
The first <code><animate></code> element drops the gain from 1
to 0.39 over 0.3s, freezing that value after it ends,
and the second one raises it back in the
final 0.3s of this description. Then the <code><span></code> element is
timed to begin only after the first audio dip has finished.</p>
<p>If the audio recording is long and just a snippet needs to be played,
that can be done using <code>clipBegin</code> and <code>clipEnd</code>.
If we just want to play the part of the audio from file from 5s to
8s it would look like:</p>
<pre class="example"
data-include="examples/intro-script-with-audio-clipped.xml"
data-include-format="text">
</pre>
<p>Or audio attributes can be added to trigger the text to be spoken:
</p>
<pre class="example"
data-include="examples/intro-script-with-speak.xml"
data-include-format="text">
</pre>
<p>It is also possible to embed the audio directly,
so that a single document contains the <a>script</a> and
recorded audio together:
</p>
<pre class="example"
data-include="examples/intro-script-with-embedded-audio.xml"
data-include-format="text">
</pre>
<h4>Dubbing Examples</h4>
<p>From the basic structure of <a href="#example-1"></a>,
transcribing the audio produces an original language dubbing <a>transcript</a>,
which can look as follows.
No specific style or layout is defined, and here the focus is on the transcription of the dialogue.
Characters are identified within the <code><metadata></code> element.
Note that the language and the <a>text language source</a> are defined using
<code>xml:lang</code> and <a><code>daptm:langSrc</code></a> attributes respectively,
which have the same value
because the transcript is not translated.</p>
<pre class="example"
data-include="examples/intro-original-language.xml"
data-include-format="text">
</pre>
<p>After translating the text, the document is modified. It includes translation text, and
in this case the original text is preserved. The main document's <a>default language</a> is changed to indicate
that the focus is on the translated language.
The combination of the <code>xml:lang</code> and <a><code>daptm:langSrc</code></a> attributes are used
to mark the text as being original or translated.
In this case, they are present on both the <code><tt></code> and <code><p></code>
elements to make the example easier to read, but it would also be possible to omit
them in some cases, making use of the inheritance model:</p>
<pre class="example"
data-include="examples/intro-original-language-with-dub-language.xml"
data-include-format="text">
</pre>
<p>The process of adaptation, before recording, could adjust the wording and/or add further timing to assist in the recording.
The <code>daptm:scriptType</code> attribute is also modified, as in the following example:</p>
<pre class="example"
data-include="examples/intro-original-language-with-dub-language-and-adaptation.xml"
data-include-format="text">
</pre>
</section>
</section>
<section>
<h2>Documentation Conventions</h2>
<p>
This document uses the following conventions:
</p>
<ul>
<li>When referring to an [[XML]] element in the prose,
angled brackets and a specific style are used as follows: <code><someElement></code>.
The entity is also described as an element in the prose.
If the name of an element referenced in this specification
is not namespace qualified, then the TT namespace applies (see <a href="#namespaces">Namespaces</a>).</li>
<li>When referring to an [[XML]] attribute in the prose,
the attribute name is given with its prefix,
if its namespace has a value,
or without a prefix if its namespace has no value.
Attributes with prefixes are styled as <code>attributePrefix:attributeName</code>
and those without prefixes are styled as <code>attributeName</code>.
The entity is also described as an attribute in the prose.</li>
<li>When defining new [[XML]] attributes, this specification uses the conventions used for
"value syntax expressions" in [[TTML2]]. For example, the following would define a new attribute
called <code>daptm:foo</code> as a string with two possible values:
<code>bar</code> and <code>baz</code>.
<div class="exampleInner">
<pre class="language-abnf">
daptm:foo
: "bar"
| "baz"
</pre>
</div>
</li>
<li>When referring to the position of an element or attribute in the [[XML]] document,
the [[XPath]] <a data-cite="XPath#location-paths"><code>LocationPath</code></a> notation is used.
For example, to refer to the first <code><metadata></code> element child of
the <code><head></code> element child of
the <code><tt></code> element,
the following path would be used:
<code>/tt/head/metadata[0]</code>.
</li>
<li><a>Registry sections</a> that include registry table data are indicated as follows:
<div class="registry-table-section">
<p>Content in registry table sections has different requirements
for updates than other Recommendation track content,
as defined in [[w3c-process]].
</p>
</div>
</li>
</ul>
</section>
<section id="data-model">
<h2>DAPT Data Model and corresponding TTML syntax</h2>
<p>This section specifies the data model for DAPT and its corresponding TTML syntax.
In the model, there are objects which can have properties and be associated with other objects.
In the TTML syntax, these objects and properties are expressed as elements and attributes,
though it is not always the case that objects are expressed as elements and properties as attributes.
</p>
<p><a href="#fig-class-diagram"></a> illustrates the DAPT data model, hyperlinking every object and property
to its corresponding section in this document.
<a>Shared properties</a> are shown in italics.
All other conventions in the diagram are as per [[?uml]].
</p>
<figure id="fig-class-diagram" class="informative">
<div data-include="figures/class-diagram.svg"></div>
<figcaption>
(Informative) Class diagram showing main entities in the DAPT data model.
</figcaption>
</figure>
<p class="issue" data-number="116"></p>
<section>
<h3>DAPT Script</h3>
<p>A <dfn>DAPT Script</dfn> is a <a>transcript</a> or <a>script</a>
that corresponds to a document processed within an authoring workflow or processed by a client,
and conforms to the constraints of this specification.
It has properties and objects defined in the following sections:
<a>Script Represents</a>, <a>Script Type</a>, <a>Default Language</a>, <a>Text Language Source</a>, <a>Script Events</a>
and, for <a>Dubbing Scripts</a>, <a>Characters</a>.</p>
<p>A <dfn>DAPT Document</dfn> is a [[TTML2]] <a>timed text content document instance</a> representing a <a>DAPT Script</a>.
A <a>DAPT Document</a> has the structure and constraints defined in this and the following sections.</p>
<p class="note">
A [[TTML2]] <a>timed text content document instance</a> has
a root <code><tt></code> element
in the TT namespace.
</p>
<section>
<h4>Script Represents</h4>
<p>The <dfn>Script Represents</dfn> property is a mandatory property of a <a>DAPT Script</a> which
indicates which components of the <a>related media object</a>
the contents of the document represent.
The contents of the document could be used as part of a mechanism
to provide an accessible alternative for those components.
</p>
<p class="note"><a>Script Events</a> have a related property, <a>Represents</a>,
and there are constraints about the permitted values of that property that
are dependent on the values of <a>Script Represents</a>.</p>
<p>To represent this property, the <dfn><code>daptm:scriptRepresents</code></dfn> attribute
MUST be present on the <code><tt></code> element,
with a value conforming to the following syntax:</p>
<div class="exampleInner">
<pre class="language-abnf">
daptm:scriptRepresents
: <<a>content-descriptor</a>> ( <lwsp>+ <content-descriptor>)*
<a data-cite="TTML2#style-value-lwsp"><lwsp></a> # as TTML2
</pre>
</div>
<aside class="example">
<p>A dubbing script might have <code>daptm:scriptRepresents="audio.dialogue"</code>.</p>
<p>An audio description script might have <code>daptm:scriptRepresents="visual.nonText visual.text visual.dialogue"</code>.</p>
<p>A post-production script that could be the precursor to a hard of hearing subtitle document
might have <code>daptm:scriptRepresents="audio.dialogue audio.nonDialogueSounds"</code>.</p>
</aside>
</section>
<section>
<h4>Default Language</h4>
<p>The <dfn>Default Language</dfn> is a mandatory property of a <a>DAPT Script</a>
which represents the default language for the <a>Text</a> content of <a>Script Events</a>.
This language may be one of the original languages or a <a>Translation</a> language.
When it represents a <a>Translation</a> language, it may be the final language
for which a dubbing or audio description <a>script</a> is being prepared,
called the <dfn>Target Recording Language</dfn> or it may be an intermediate, or pivot, language
used in the workflow.
</p>
<p>The <a>Default Language</a> is represented in a <a>DAPT Document</a> by the following structure and constraints:
<ul>
<li>the <code>xml:lang</code> attribute MUST be present on the <code><tt></code> element and its value MUST NOT be empty.</li>
</ul>
</p>
<p class="note">All text content in a <a>DAPT Script</a> has a specified language.
When multiple languages are used, the <a>Default Language</a> can correspond to the language of the majority of <a>Script Events</a>,
to the language being spoken for the longest duration, or to a language arbitrarily chosen by the author.</p>
<aside class="example">An <a>Original Language Transcript</a> of dialogue is prepared for a video
containing dialogue in Danish and Swedish.
The <a>Default Language</a> is set to Danish by setting <code>xml:lang="da"</code> on the <code><tt></code> element.
<a>Script Events</a> that contain Swedish <a>Text</a> override this by setting
<code>xml:lang="sv"</code> on the <code><p></code> element.
<a>Script Events</a> that contain Danish <a>Text</a> can set the <code>xml:lang</code> attribute
or omit it, since the inherited language is the <a>Default Language</a> of the document.
In both cases the Script Events' <a>Text</a> objects are <code><p></code> elements that represent untranslated
content that had an inherent language (in this case dialogue)
and therefore set the <a><code>daptm:langSrc</code></a> attribute to their source language,
implying that they are in the <a>Original</a> language.</aside>
</section>
<section>
<h4>Script Type</h4>
<p>The <dfn>Script Type</dfn> property is a mandatory property of a <a>DAPT Script</a>
which describes the type of documents used in Dubbing and Audio Description workflows,
among the following:
<a>Original Language Transcript</a>,
<a>Translated Transcript</a>,
<a>Pre-recording Script</a>,
<a>As-recorded Script</a>.</p>
<p>To represent this property, the <dfn><code>daptm:scriptType</code></dfn> attribute MUST be present on the <code><tt></code> element:</p>
<div class="exampleInner">
<pre class="language-abnf">
daptm:scriptType
: "originalTranscript"
| "translatedTranscript"
| "preRecording"
| "asRecorded"
</pre>
</div>
<p>The definitions of the types of documents and the corresponding <code>daptm:scriptType</code> attribute values are:
<ul>
<li>
<dfn>Original Language Transcript</dfn>:
<p>When the <code>daptm:scriptType</code> attribute value is <code>originalTranscript</code>,
the document is a literal transcription of the dialogue and/or on-screen text in their inherent spoken/written language(s),
or of non-dialogue sounds and non-linguistic visual content.</p>
<p><a>Script Events</a> in this type of <a>transcript</a>:</p>
<ul>
<li>SHOULD contain <a>Original</a> <a>Text</a> objects;</li>
<li>SHOULD NOT contain <a>Translation</a> <a>Text</a> objects.</li>
</ul>
<aside class="example">If a programme contains dialogue in English and Hebrew,
the <a>Original Language Transcript</a> will contain some <a>Script Events</a> in English and some in Hebrew,
all containing <a>Original</a> <a>Text</a> objects.
The document contains no <a>Translation</a> <a>Text</a> objects.</aside>
</li>
<li>
<dfn>Translated Transcript</dfn>:
<p>When the <code>daptm:scriptType</code> attribute value is <code>translatedTranscript</code>,
the document represents a translation of the <a>Original Language Transcript</a> in a common language.</p>
<p>It can be adapted to produce a <a>Pre-Recording Script</a>,
and/or used as the basis for a further translation into the <a>Target Recording Language</a>.</p>
<p><a>Script Events</a> in this type of <a>transcript</a>:</p>
<ul>
<li>SHOULD contain <a>Translation </a><a>Text</a> objects;</li>
<li>MAY also contain <a>Original</a> <a>Text</a> objects.</li>
</ul>
<aside class="example">If a programme contains dialogue in English and Hebrew,
the French <a>Translated Transcript</a> will contain at least the translation in French of all <a>Script Events</a>.
It may still retain text content in Hebrew and English to assist further processing.</aside>
<aside class="example">If an <a>audio description</a> <a>Original Language Transcript</a> contains
<a>Original</a> language <a>Script Events</a> that describe in-image text content,
and the desired <a>audio description</a> output needs to be in a different language,
the <a>Text</a> objects can be <a>Translation</a> <a>Text</a> objects.
In that case, it is appropriate to mark the transcript as a <a>Translated Transcript</a>.
It may also be appropriate, as part of the translation activity, to describe within the translated text
content the original language of that text, to inform the audience,
for example, "A Japanese newspaper headline that means: sailor completes ocean crossing".
</aside>
</li>
<li>
<dfn>Pre-recording Script</dfn>:
<p>When the <code>daptm:scriptType</code> attribute value is <code>preRecording</code>,
the document represents the result of the adaptation of an <a>Original Language Transcript</a> or
a <a>Translated Transcript</a> for recording, e.g. for better lip-sync in a dubbing workflow,
or to ensure that the words can fit within the time available in an audio description workflow.</p>
<p><a>Script Events</a> in this type of <a>script</a>:</p>
<ul>
<li>SHOULD contain <a>Text</a> objects
in the <a>Target Recording Language</a>;</li>
<li>MAY also contain <a>Original</a> <a>Text</a> objects from the <a>Original Language Transcript</a>
in the case that their language is not the <a>Target Recording Language</a>,
for context, to assist further processing;</li>
<li>SHOULD NOT contain <a>Audio</a> objects.</li>
</ul>
<aside class="note">The <a>Script Type</a> of a <a>DAPT Script</a> cannot necessarily be detected
by inspecting the text content of the document.
For example, the adaptation of a <a>Translated Transcript</a> into a <a>Pre-recording Script</a>
can consist in replacing some words in the text content of a <a>Script Event</a> without altering the rest of the document.
In either case, <a>Translation</a> <a>Text</a> objects
have their <a>Text Language Source</a> properties
set to the source language from which they were translated.</aside>
<aside class="note">The <a>Original</a> <a>Text</a> objects in Audio Description <a>Script Events</a>
have an empty <a>Text Language Source</a> property
if they represent visual elements of the scene that do not have an inherent language.
Otherwise if they do represent visual elements with an inherent language, such as in-image text,
they are required to have a <a>Text Language Source</a> that specifies a language.
If audio description <a>scripts</a> are translated,
their translations would be represented by <a>Translation</a>
<a>Text</a> objects.</aside>
</li>
<li>
<dfn>As-recorded Script</dfn>:
<p>When the <code>daptm:scriptType</code> attribute value is <code>asRecorded</code>,
the document represents the actual audio recording.</p>
<p><a>Script Events</a> in this type of <a>script</a>:</p>
<ul>
<li>SHOULD contain <a>Text</a> objects
in the <a>Target Recording Language</a>;</li>
<li>MAY also contain <a>Original</a> <a>Text</a> objects from
the <a>Original Language Transcript</a>
or <a>Translation</a> <a>Text</a> objects in other languages
for context and quality verification;</li>
<li>MAY also contain links to audio and mixing instructions
for the purpose of producing an audio track incorporating the recordings;</li>
<li>SHOULD contain <a>Audio Recording</a> objects;</li>
<li>SHOULD NOT contain <a>Synthesized Audio</a> objects.</li>
</ul>
<aside class="note"><a>Translation</a> <a>Text</a> objects within <a>As-recorded Scripts</a> retain their <a>Text Language Source</a>,
so that the source language from which they were translated remains available.</aside>
</li>
</ul>
</p>
<p class="ednote">The following example is orphaned - move to the top of the section, before the enumerated script types?</p>
<pre class="example">
<tt daptm:scriptType="originalTranscript">
...
</tt>
</pre>
</section>
<section>
<h4>Script Events</h4>
<p>A <a>DAPT Script</a> MAY contain zero or more <a>Script Event</a> objects,
each corresponding to dialogue, on screen text, or descriptions for a given time interval.</p>
<p>If any <a>Script Events</a> are present, the <a>DAPT Document</a> MUST have
one <code><body></code> element child of the <code><tt></code> element.</p>
</section>
<section>
<h4>Characters</h4>
<p>A <a>DAPT Script</a> MAY contain zero or more <a>Character</a> objects, each describing a character that can be referenced by a <a>Script Event</a>.</p>
<p>If any <a>Character</a> objects are present, the <a>DAPT Document</a> MUST have
one <code><head></code> element child of the <code><tt></code> element,
and that <code><head></code> element MUST have
at least one <code><metadata></code> element child.</p>
<p class="note"><a href="#character"></a> recommends that
all the <a>Character</a> objects be located within
a single <code><metadata></code> element parent,
and in the case that there are more than one
<code><metadata></code> element children of
the <code><head></code> element,
that the <a>Character</a> objects are located in the first such child.</p>
</section>
<section>
<h4>Shared properties and Value Sets</h4>
<p>Some of the properties in the DAPT data model are common within more than one object type,
and carry the same semantic everywhere they occur.
These <dfn>shared properties</dfn> are listed in this section.
</p>
<p>Some of the value sets in DAPT are reused across more than one property,
and have the same constraints everywhere they occur.
These shared value sets are also listed in this section.
</p>
<p class="ednote">Would it be better to make a "Timed Object" class and subclass Script Event,
Mixing Instruction and Audio Recording from it?
</p>
<section>
<h5>Timing Properties</h5>
<p>The following <dfn data-lt="timing property|timing properties">timing properties</dfn>
define when the entities that contain them are active:
</p>
<ul>
<li>The <dfn>Begin</dfn> property defines when an object becomes active,
and is relative to the active begin time of the parent object.
<a>DAPT Scripts</a> begin at time zero on the media timeline.
</li>
<li>The <dfn>End</dfn> property defines when an object stops being active,
and is relative to the active begin time of the parent object.</li>
<li>The <dfn>Duration</dfn> property defines the maximum duration of an object.
<p class="note">If both an <a>End</a> and a <a>Duration</a> property are present,
the end time is the earlier of <a>End</a> and <a>Begin</a> + <a>Duration</a>,
as defined by [[TTML2]].</p>
</li>
</ul>
<div class="note">If any of the <a>timing properties</a> is omitted, the following rules apply,
paraphrasing the timing semantics defined in [[TTML2]]:
<ul>
<li>The default value for <a>Begin</a> is zero, i.e. the same as the begin time of the parent object.</li>
<li>The default value for <a>End</a> is indefinite,
i.e. it resolves to the same as the end time of the parent timed object,
if there is one.</li>
<li>The default value for <a>Duration</a> is indefinite,
i.e. the end time resolves to the same as the end time of the parent object.</li>
</ul>
</div>
<p class="note">
The end time of a <a>DAPT Script</a> is for practical purposes the end of the <a>Related Media Object</a>.
</p>
</section>
<section id="contentDescriptor">
<h5><code><content-descriptor></code> values</h5>
<p>The values permitted in the <a>Script Represents</a> and <a>Represents</a> properties depend on the
<code><<dfn>content-descriptor</dfn>></code> syntactic definition
and its associated registry table.
</p>
<p><code><<a>content-descriptor</a>></code> has a value conforming to the following syntax:</p>
<div class="exampleInner">
<pre class="language-abnf nohighlight">
<content-descriptor> # see registry table below
: <descriptor-token> ( <descriptor-delimiter> <descriptor-token> )*
<<dfn>descriptor-token</dfn>>
: (descriptorTokenChar)+
descriptorTokenChar # <a data-cite="xmlschema-2#NMTOKEN">xsd:NMtoken</a> without the "."
: <a data-cite="xml#NT-NameStartChar">NameStartChar</a> | "-" | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040]
<descriptor-delimiter>
: "." # FULL STOP U+002E
</pre>
</div>
<p><code><<a>content-descriptor</a>></code> has values that are delimiter separated ordered lists
of tokens.</p>
<p>A <code><<a>content-descriptor</a>></code> value <em>B</em> is a <dfn data-abbr="sub-type">content descriptor sub-type</dfn>
of another <code><content-descriptor></code> value <em>A</em> if A's ordered list of <a>descriptor-tokens</a> is
present at the beginning of B's ordered list of <a>descriptor-tokens</a>.
</p>
<aside class="example">
<table class="data">
<caption>Table demonstrating example values of <code><<a>content-descriptor</a>></code>
and whether each is a <a>sub-type</a> of the other.
</caption>
<thead>
<tr>
<th><code><content-descriptor></code> A</th>
<th><code><content-descriptor></code> B</th>
<th>Is B a <a>sub-type</a> of A?</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>visual.text</code></td>
<td><code>visual</code></td>
<td>No</td>
</tr>
<tr>
<td><code>visual.text</code></td>
<td><code>visual.text</code></td>
<td>Yes</td>
</tr>
<tr>
<td><code>visual.text</code></td>
<td><code>visual.text.location</code></td>
<td>yes</td>
</tr>
</tbody>
</table>
<p>For example, in this table, A could be one of the values listed in <a>Script Represents</a> property,
and B could be the value of a <a>Represents</a> property.</p>
</aside>
<p>The permitted values for <code><<a>content-descriptor</a>></code>
are either those listed in the following <a>registry table</a>, or can be user-defined.</p>
<p>Valid user-defined values MUST begin with <code>x-</code> or be <a>sub-types</a> of
values in the <code>content-descriptor</code> registry table, where the
first additional <code><<a>descriptor-token</a>></code> component begins with <code>x-</code>.</p>
<div class="registry-table-section">
<table class="data">
<caption><a>Registry table</a> for the <code><<a>content-descriptor</a>></code> component
whose Registry Definition is at <a href="#registry-table-content-descriptor"></a></caption>
<thead>
<th><code><<a>content-descriptor</a>></code></th>
<th>Status</th>
<th>Description</th>
<th>Example usage</th>
</thead>
<tbody>
<tr>
<td><code>audio</code></td>
<td>Provisional</td>
<td>Indicates that the DAPT content represents any part of the audio programme.</td>
<td>Dubbing, translation and hard of hearing subtitles and captions, pre- and post- production scripts</td>
</tr>
<tr>
<td><code>audio.dialogue</code></td>
<td>Provisional</td>
<td>Indicates that the DAPT content represents verbal communication in the audio programme,
for example, a spoken conversation.</td>
<td>Dubbing, translation and hard of hearing subtitles and captions, pre- and post- production scripts</td>
</tr>
<tr>
<td><code>audio.nonDialogueSounds</code></td>
<td>Provisional</td>
<td>Indicates that the DAPT content represents a part of
the audio programme corresponding to sounds that are not verbal communication,
for example, significant sounds, such as a door being slammed in anger.
</td>