Page MenuHomePhabricator

workflow_demo: Uncaught SyntaxError for Norwegian
Closed, ResolvedPublic

Description

http://localhost/wikispeech_mockup/workflow_demo/test.html

Steps to reproduce:

  1. Startpage: Select "nb"
  2. Click "Start"
  3. In the Lexicon tab, select "banebrydende" (or I think pretty much any word in the Norwegian demo)
  4. Open the javascript console
  5. Click the "listen" button in the left area of the window. You will see this error in the console (no audio is played):
500 (INTERNAL SERVER ERROR)
Uncaught SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at XMLHttpRequest.xhr.onload (wikispeech_simple_player.js:159)

Update: The "listen" button under SSML transcription seems to work, but not the lefthand "listen" buttons.


Output from the wikispeech server:

[2017-09-29 15:13:23,027] ERROR in app: Exception on /wikispeech/ [POST]
Traceback (most recent call last):
  File "/home/hanna/.local/lib/python3.5/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/hanna/.local/lib/python3.5/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/hanna/.local/lib/python3.5/site-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/home/hanna/.local/lib/python3.5/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/hanna/.local/lib/python3.5/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/hanna/.local/lib/python3.5/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/hanna/.local/lib/python3.5/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "./wikispeech_server/wikispeech.py", line 154, in wikispeech
    markup = textproc(lang, textprocessor_name, input, input_type=input_type)
  File "./wikispeech_server/wikispeech.py", line 367, in textproc
    utt = process(text, lang, component, input_type=input_type)
  File "./wikispeech_server/adapters/marytts_adapter.py", line 61, in marytts_preproc
    (marylang, utt) = maryxml2utt(xml, tp_config)
  File "./wikispeech_server/adapters/marytts_adapter.py", line 441, in maryxml2utt
    utt =  mary2ws(xml, voice)
  File "./wikispeech_server/adapters/marytts_adapter.py", line 459, in mary2ws
    root = ET.fromstring(maryxml.encode('utf-8'))
  File "/usr/lib/python3.5/xml/etree/ElementTree.py", line 1344, in XML
    parser.feed(text)
  File "<string>", line None
xml.etree.ElementTree.ParseError: mismatched tag: line 1, column 2052
127.0.0.1 - - [29/Sep/2017 15:13:23] "POST /wikispeech/ HTTP/1.1" 500 -

Event Timeline

HannaLindgren renamed this task from Norwegian: Uncaught SyntaxError to workflow_demo: Uncaught SyntaxError for Norwegian.Sep 29 2017, 1:02 PM

No, it didn't work after all... But the "listen" button under SSML transcription seems to work.

The error message is very confusing - but what actually happens is that marytts returns an error, because there is an unknown symbol in the transcription. "." instead of "-" as syllable separator.
The mapper isn't called in that case. Why not?
The transcription in the table on the left is mapped, and in the "ssml transcription field". But not in the "lexicon entries" field.

The lexicon wasn't setup right in wikispeech_server/voice_config
But now that it is, it's worse, all transcription fields are now wrong and there seems to be no mapper available for norwegian marytts sampa .
Nothing should have worked before so in that sense it's better now. Right place to look, anyway, at the mapper.

Symboltable added to git/lexdata. Mapper added to voice_config for Norwegian.
Works for me now.

The listen buttons in the attached image still do not work for me for Norwegian. Same error, I think:

VM119:1 POST http://localhost:10000/wikispeech/ 500 (INTERNAL SERVER ERROR)
VM173:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at XMLHttpRequest.xhr.onload (wikispeech_simple_player.js:159)

image.png (174×788 px, 23 KB)

Did you update lexdata, copy the new symboltable, restart pronlex server, update wikispeech, restart wikispeech server?
In that case I must have forgotten to commit something.

I think so... But I should probably test on a clean install. Right now the workflow demo is probably not working properly since the wikispeech server is undergoing some changes in db names. We probably need to wait for T177595 to be finished until we can try again with the workflow demo.

Seems to be working now.