New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give "Jasper" a different name #8

Closed
ivdma opened this Issue Apr 9, 2014 · 13 comments

Comments

Projects
None yet
9 participants
@ivdma

ivdma commented Apr 9, 2014

Is it possible to set Jasper's name in configuration? This is useful in the following scenarios:

  1. Lots of Dutch people are called Jasper.
  2. Some people can't pronounce some letters.

Last example is personal: I stutter, and have difficulties with some letters from time to time. Sounds "dje" (English way to pronounce Jasper) and "ya" (Dutch way to pronounce Jasper) are difficult for me to pronounce.

@ivdma ivdma changed the title from Give "Jasper" different name to Give "Jasper" a different name Apr 9, 2014

@shbhrsaha

This comment has been minimized.

Member

shbhrsaha commented Apr 9, 2014

Yes, it should be relatively straightforward for developers to do themselves. The name is hardcoded in just a handful of places in the code, which can be searched for:

main.py
musicmode.py

Those should be the most important ones!

@shbhrsaha shbhrsaha closed this Apr 9, 2014

@ivdma

This comment has been minimized.

ivdma commented Apr 9, 2014

Thanks!

@shbhrsaha

This comment has been minimized.

Member

shbhrsaha commented Apr 10, 2014

You'll also want to recompile dictionary_persona.dic with the new persona name.

@hipy

This comment has been minimized.

hipy commented Apr 10, 2014

How do you recompile the dictionary?

@shbhrsaha

This comment has been minimized.

Member

shbhrsaha commented Apr 10, 2014

One way is by uploading a file containing the words you wish to include, into this tool: http://www.speech.cs.cmu.edu/tools/lmtool-new.html. Then, copy the resulting .dic and .lm file to replace the existing dictionary_persona.lm and languagemodel_persona.lm. Note that in the persona dictionary and language model we provide, we include a few other simple words to avoid false positives. It makes the model less likely to read "Jasper" when the word was actually not spoken.

@hipy

This comment has been minimized.

hipy commented Apr 10, 2014

Let me rephrase my question, what even does it do. I see for example Jasper and how it's said phonetically. But what do the other words do?

@crm416

This comment has been minimized.

Member

crm416 commented Apr 10, 2014

When audio input comes in, the language model has to output something. If "Jasper" were the only word in the dictionary, then whenever audio input came in, the model would recognize "Jasper", even if you'd said "Blah blah blah".

By adding the additional words to the language model (e.g., "what", "if", etc.), we provide it with alternative interpretations of audio input, so that when it recognizes "Jasper", it's actually significant.

@bdoooh

This comment has been minimized.

bdoooh commented Jun 25, 2014

So if we were to recompile the dictionary with a new name, what's the sentence we need to upload to the lmtool to get the dictionary files? Which sentence did you use for Jasper?

@crm416

This comment has been minimized.

Member

crm416 commented Jun 28, 2014

One way to do it would be to copy the existing dictionary_persona.dic into a new file, say sentences_persona.txt. Look at the structure of each new: it's an English word, followed by a space, followed by phonetic pronunciations. Follow these steps:

  1. Remove all the pronunciations so that you just have a list of English words, one-per-line.
  2. Replace line 9 ("JASPER") with your new name.
  3. After that, you'll want to replace "JASPER" wherever it's hard-coded in the codebase (e.g., main.py, line 28).

@crm416 crm416 reopened this Jun 28, 2014

@crm416 crm416 closed this Jun 28, 2014

@svanlan1

This comment has been minimized.

svanlan1 commented May 25, 2015

Is this still valid? And if so, where are dictionary_persona.dic and sentences_persona.txt?

@professorDODO

This comment has been minimized.

professorDODO commented Jun 7, 2015

I replaced "JASPER", which now could be found in jasper.py line 117, with my choosen name. I addes it to dictionary_persona.dic compiled it and replaced the .dic and .lm files in ~/jasper/static/. My problem is, that he still recognizes the words from the old .dic file (tested by deleting JASPER, but he still recognizes it). Are the .dic .lm files, save somewhere else or in some kind of cache?

EDIT: SOLVE: the keyword_phrases file has to be replaced too.

@amitch56

This comment has been minimized.

amitch56 commented Jul 14, 2015

@profoessorDODO
Was there anything else besides updating the keyword_phrases file with your new chosen name? I've replaced that file, along with the .dic and .lm files and the new name isn't being recognized (though the old one is and its been removed from the above mentioned files). I've rebooted a few times too.

@FreakErn

This comment has been minimized.

FreakErn commented Jul 14, 2015

You'll have to update the listening word in the jasper.py in line 117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment