Page MenuHomePhabricator

Arabic marytts fails on quoted latin text
Open, LowPublic


The request was:


1opusenc opus-tools 0.1.8 (using libopus 1.1)
2Copyright (C) 2008-2013 Xiph.Org Foundation
3Encoding using libopus 1.1 (audio)
5 Input: 16kHz 1 channel
6 Output: 1 channel (1 uncoupled)
7 20ms packets, 33kbit/sec VBR
8 Preskip: 312
12[|] 00:00:00.02 2e+04x realtime, 33.07kbit/s
13Encoding complete
15 Encoded: 0.88 seconds
16 Runtime: 1e-06 seconds
17 (8.8e+05x realtime)
18 Wrote: 4425 bytes, 44 packets, 3 pages
19 Bitrate: 31.9364kbit/s (without overhead)
20 Instant rates: 28kbit/s to 37.6kbit/s
21 (70 to 94 bytes per packet)
22 Overhead: 20.6% (container+metadata)
24 File "bin/wikispeech", line 28, in <module>
25 import wikispeech_server.test_api
26 File "./wikispeech_server/", line 43, in <module>
27 assert ( langs == expected_langs ) , "%s and %s are not equal" % (expected_langs, langs)
28 * Running on (Press CTRL+C to quit)
29[2017-09-26 15:22:21,241] ERROR in app: Exception on /wikispeech/ [POST]
30Traceback (most recent call last):
31 File "/usr/local/lib/python3.4/dist-packages/flask/", line 1982, in wsgi_app
32 response = self.full_dispatch_request()
33 File "/usr/local/lib/python3.4/dist-packages/flask/", line 1614, in full_dispatch_request
34 rv = self.handle_user_exception(e)
35 File "/usr/local/lib/python3.4/dist-packages/flask_cors/", line 161, in wrapped_function
36 return cors_after_request(app.make_response(f(*args, **kwargs)))
37 File "/usr/local/lib/python3.4/dist-packages/flask/", line 1517, in handle_user_exception
38 reraise(exc_type, exc_value, tb)
39 File "/usr/local/lib/python3.4/dist-packages/flask/", line 33, in reraise
40 raise value
41 File "/usr/local/lib/python3.4/dist-packages/flask/", line 1612, in full_dispatch_request
42 rv = self.dispatch_request()
43 File "/usr/local/lib/python3.4/dist-packages/flask/", line 1598, in dispatch_request
44 return self.view_functions[rule.endpoint](**req.view_args)
45 File "./wikispeech_server/", line 154, in wikispeech
46 markup = textproc(lang, textprocessor_name, input, input_type=input_type)
47 File "./wikispeech_server/", line 367, in textproc
48 utt = process(text, lang, component, input_type=input_type)
49 File "./wikispeech_server/adapters/", line 61, in marytts_preproc
50 (marylang, utt) = maryxml2utt(xml, tp_config)
51 File "./wikispeech_server/adapters/", line 441, in maryxml2utt
52 utt = mary2ws(xml, voice)
53 File "./wikispeech_server/adapters/", line 459, in mary2ws
54 root = ET.fromstring(maryxml.encode('utf-8'))
55 File "/usr/lib/python3.4/xml/etree/", line 1325, in XML
56 parser.feed(text)
57 File "<string>", line None
58xml.etree.ElementTree.ParseError: mismatched tag: line 1, column 2227
5910.68.21.68 - - [26/Sep/2017 15:22:21] "POST /wikispeech/ HTTP/1.1" 500 -

Event Timeline

HannaLindgren added a subscriber: HannaLindgren.EditedOct 3 2017, 3:50 PM

Seems like it origins from an error in marytts? The data sent from wikispeech to marytts is correct, I think. See stacktrace below.

Other comments:

  • The URL works with lang=sv instead of lang=ar
  • The URL works if I remove special characters from the input text (quote and %3A)

I also added some error checking in wikispeech. In

if r.status_code != 200:
   log.debug("marytts call failed with error %d" % r.status_code)
   log.debug("marytts error text %s" % r.text)
   raise ValueError("marytts call failed with error", r.status_code, r.text)

MaryTTS stacktrace:

Internal server error</h1><p>Processing failed.<pre>java.lang.Exception: Module JPhonemiser: Problem processing the data.
	at marytts.server.Request.processOneChunk(
	at marytts.server.Request.processOrLookupOneChunk(
	at marytts.server.Request.process(
	at marytts.server.http.SynthesisRequestHandler.process(
	at marytts.server.http.SynthesisRequestHandler.handleClientRequest(
	at marytts.server.http.BaseHttpRequestHandler.handle(
	at org.apache.http.nio.protocol.BufferingHttpServiceHandler$RequestHandlerAdaptor.handle(
	at org.apache.http.nio.protocol.SimpleNHttpRequestHandler.handle(
	at org.apache.http.nio.protocol.AsyncNHttpServiceHandler.processRequest(
	at org.apache.http.nio.protocol.AsyncNHttpServiceHandler.requestReceived(
	at org.apache.http.nio.protocol.BufferingHttpServiceHandler.requestReceived(
	at org.apache.http.impl.nio.DefaultNHttpServerConnection.consumeInput(
	at org.apache.http.impl.nio.DefaultServerIOEventDispatch.inputReady(
	at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(
	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(
	at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(
	at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(
	at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(
	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$
Caused by: java.lang.IllegalArgumentException: Cannot syllabify empty phone string
	at marytts.modules.phonemiser.AllophoneSet.syllabify(
	at marytts.modules.phonemiser.TrainedLTS.syllabify(
	at marytts.modules.JPhonemiser.process(
	at marytts.server.Request.processOneChunk(
	... 19 more
HaraldBerthelsen triaged this task as Lowest priority.Dec 5 2017, 12:33 PM

Tokenisation problem in Arabic marytts. Is it even wrong? The input is very unlikely for an Arabic synthesis. However there could definitely be a better error message!
Maybe the problem is in handling the various types of quotes used in Arabic? Or just that quotes work with Arabic script input but not with Latin script.
This works:
وكتابه "نهاية الإيجار في دراية الإعجاز" يعتبر من المراجع البلاغية المهمة.
But the example in this ticket doesn't and neither does this:
"Bob Dylan"

HaraldBerthelsen renamed this task from Server error: xml.etree.ElementTree.ParseError: mismatched tag: line 1, column 2227 to Arabic marytts fails on quoted latin text.Dec 5 2017, 12:35 PM
HannaLindgren raised the priority of this task from Lowest to Low.Oct 23 2019, 9:43 AM
Restricted Application added a subscriber: alanajjar. · View Herald TranscriptOct 23 2019, 9:43 AM
Aklapper removed HaraldBerthelsen as the assignee of this task.Jun 19 2020, 4:27 PM
Aklapper added subscribers: HaraldBerthelsen, Aklapper.

This task has been assigned to the same task owner for more than two years. Resetting task assignee due to inactivity, to decrease task cookie-licking and to get a slightly more realistic overview of plans. Please feel free to assign this task to yourself again if you still realistically work or plan to work on this task - it would be welcome!

For tips how to manage individual work in Phabricator (noisy notifications, lists of task, etc.), see for available options.
(For the records, two emails were sent to assignee addresses before resetting assignees. See T228575 for more info and for potential feedback. Thanks!)

Restricted Application added a project: Wikispeech-Jobrunner. · View Herald TranscriptJun 19 2020, 4:27 PM