Page MenuHomePhabricator

Playback stalled if utterance fail to load when prepared by previous utterance starting to play
Open, HighPublic16 Estimated Story PointsBUG REPORT

Description

When an utterance fail to load due to server error, it can cause the playback to stall indefinitely. This happens if an utterance (u) is starting to load because the previous utterance (v) is told to start playing (event is "play", not "playing"). When v finished playing and u should start to play, it is not loaded and will not attempt to load again since there was no popup.

The easiest solution would probably be to call Storage.prepareUtterance() in Player.playUtterance() and put utterance.audio.play(); as .done() callback. This should ensure that the utterance has in fact been loaded and play immediately if it is already loaded.

Potentially related to T284077.

1Loading audio for utterance #40:
2Object { content: (3) […], startOffset: 4, endOffset: 5, hash: "443dbf47d5827921be51c9c2bb4af1aeabb3e75587d0742558f968d71287ce6c", audio: audio }
3
4audio: <audio src="data:audio/ogg;base64,T2dnUwACAAAAAAAAAAA/zf4+AAAA…">
5
6content: Array(3) [ {…}, {…}, {…} ]
7
8endOffset: 5
9
10hash: "443dbf47d5827921be51c9c2bb4af1aeabb3e75587d0742558f968d71287ce6c"
11
12request: null
13
14startOffset: 4
15
16tokens: Array(7) [ {…}, {…}, {…}, … ]
17​​
180: Object { string: "Go", startTime: 0, endTime: 220, … }
19​​
201: Object { string: "to", startTime: 220, endTime: 395, … }
21​​
222: Object { string: "the", startTime: 395, endTime: 485, … }
23​​
243: Object { string: "Fréttinga", startTime: 485, endTime: 950, … }
25​​
264: Object { string: "page", startTime: 950, endTime: 1445, … }
27​​
285: Object { string: ".", startTime: 1445, endTime: 1445, … }
29​​
306: Object { startTime: 1445, endTime: 1850, startOffset: 6, … }
31​​
32length: 7
33​​
34<prototype>: Array []
35
36<prototype>: Object { … }
37load.php:323:15
38Sending TTS request: https://wikispeech.wikimedia.se/w/api.php?action=wikispeech-…8d71287ce6c&consumer-url=https%3A%2F%2Fwww.mediawiki.org%2Fw load.php:323:15
39
40Loading audio for utterance #41:
41Object { content: (1) […], startOffset: 0, endOffset: 2, hash: "8f0b29445fe3287f9ea70a54a9685339034389713f8f64a0fa5d86c07862f30e", audio: audio }
42
43audio: <audio>
44
45content: Array [ {…} ]
46​​
470: Object { string: "2a.", path: "./div/ul[1]/li[2]/text()" }
48​​
49length: 1
50​​
51<prototype>: Array []
52
53endOffset: 2
54
55hash: "8f0b29445fe3287f9ea70a54a9685339034389713f8f64a0fa5d86c07862f30e"
56
57request: null
58
59startOffset: 0
60
61<prototype>: Object { … }
62load.php:323:15
63Sending TTS request: https://wikispeech.wikimedia.se/w/api.php?action=wikispeech-…6c07862f30e&consumer-url=https%3A%2F%2Fwww.mediawiki.org%2Fw load.php:323:15
64
65mw.Api error: internal_api_error_MediaWiki\Wikispeech\SpeechoidConnectorException
66Object { error: {…} }
67load.php:323:15
68
69Request failed, error type "[object Object]": undefined?undefined load.php:16:757
70
71Response received:
72Object { warnings: {…}, "wikispeech-listen": {…} }
73
74warnings: Object { main: {…} }
75
76"wikispeech-listen": Object { audio: "T2dnUwACAAAAAAAAAAA/zf4+AAAAAEiWL78BE09wdXNIZWFkAQE4AYC7AAAAAABPZ2dTAAAAAAAAAAAAAD/N/j4BAAAAz+8mSQP///5PcHVzVGFncwsAAABsaWJvcHVzIDEuMwIAAAAmAAAARU5DT0RFUj1vcHVzZW5jIGZyb20gb3B1cy10b29scyAwLjEuMTAXAAAARU5DT0RFUl9PUFRJT05TPS0tcXVpZXQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA…"
79​​
80tokens: Array(7) [ {…}, {…}, {…}, … ]
81​​​
820: Object { endtime: 220, orth: "Go" }
83​​​
841: Object { endtime: 395, orth: "to" }
85​​​
862: Object { endtime: 485, orth: "the" }
87​​​
883: Object { endtime: 950, orth: "Fréttinga" }
89​​​
904: Object { endtime: 1445, orth: "page" }
91​​​
925: Object { endtime: 1445, orth: "." }
93​​​
946: Object { endtime: 1850, orth: "" }
95​​​
96length: 7
97​​​
98<prototype>: Array []
99​​
100<prototype>: Object { … }
101
102<prototype>: Object { … }
103load.php:323:15
104Setting audio url for: [40]
105Object { content: (3) […], startOffset: 4, endOffset: 5, hash: "443dbf47d5827921be51c9c2bb4af1aeabb3e75587d0742558f968d71287ce6c", audio: audio, request: {…} }
106 = 21440 base64 bytes load.php:323:15
107Loading audio for utterance #42:
108Object { content: (1) […], startOffset: 4, endOffset: 104, hash: "8bfc3423092966a8637682d32397d4a5f10ae8a864a1a408b69e1645a8367363", audio: audio }
109load.php:323:15
110Sending TTS request: https://wikispeech.wikimedia.se/w/api.php?action=wikispeech-…645a8367363&consumer-url=https%3A%2F%2Fwww.mediawiki.org%2Fw load.php:323:15
111
112Response received:
113Object { warnings: {…}, "wikispeech-listen": {…} }
114
115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, {…}, … ]
122​​​
1230: Object { endtime: 300, orth: "Click" }
124​​​
1251: Object { endtime: 395, orth: "the" }
126​​​
1272: Object { endtime: 395, orth: "\"" }
128​​​
1293: Object { endtime: 1055, orth: "Translate" }
130​​​
1314: Object { endtime: 1270, orth: "this" }
132​​​
1335: Object { endtime: 1765, orth: "page" }
134​​​
1356: Object { endtime: 1765, orth: "\"" }
136​​​
1377: Object { endtime: 2165, orth: "" }
138​​​
1398: Object { endtime: 2595, orth: "link" }
140​​​
1419: Object { endtime: 2595, orth: "(" }
142​​​
14310: Object { endtime: 2995, orth: "" }
144​​​
14511: Object { endtime: 3170, orth: "if" }
146​​​
14712: Object { endtime: 3280, orth: "it" }
148​​​
14913: Object { endtime: 3525, orth: "does" }
150​​​
15114: Object { endtime: 3785, orth: "not" }
152​​​
15315: Object { endtime: 4045, orth: "show" }
154​​​
15516: Object { endtime: 4230, orth: "up" }
156​​​
15717: Object { endtime: 4330, orth: "you" }
158​​​
15918: Object { endtime: 4605, expanded: "dont", orth: "don't" }
160​​​
16119: Object { endtime: 4795, orth: "have" }
162​​​
16320: Object { endtime: 5340, orth: "permission" }
164​​​
16521: Object { endtime: 5470, orth: "to" }
166​​​
16722: Object { endtime: 6245, orth: "translate" }
168​​​
16923: Object { endtime: 6245, orth: ")" }
170​​​
17124: Object { endtime: 6245, orth: "." }
172​​​
17325: Object { endtime: 6650, orth: "" }
174​​​
175length: 26
176​​​
177<prototype>: Array []
178​​
179<prototype>: Object { … }
180
181<prototype>: Object { … }
182load.php:323:15
183
184Setting audio url for: [42]
185Object { content: (1) […], startOffset: 4, endOffset: 104, hash: "8bfc3423092966a8637682d32397d4a5f10ae8a864a1a408b69e1645a8367363", audio: audio, request: {…} }
186 = 77376 base64 bytes

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Prioritising this due to its impact on usability.

Change 699426 had a related patch set uploaded (by Sebastian Berlin (WMSE); author: Sebastian Berlin (WMSE)):

[mediawiki/extensions/Wikispeech@master] Make sure that utterance audio is loaded before playing

https://gerrit.wikimedia.org/r/699426