Skip to content
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

Recent Master snap erased Espeak Dictionary entries #7592

Closed
Brian1Gaff opened this issue Sep 12, 2017 · 18 comments
Closed

Recent Master snap erased Espeak Dictionary entries #7592

Brian1Gaff opened this issue Sep 12, 2017 · 18 comments
Labels
bug p1 Priority 1: highest
Milestone

Comments

@Brian1Gaff
Copy link

Brian1Gaff commented Sep 12, 2017

Updated a previous master this morning Tues 12 th sept 17, around 8am utc.
Basically its an installed copy on windows 7 pro64, and all the entries vanished after the update.
If this was a consequence of the Espeak update, then OK but if its something wrong with the update code users will not be pleased if an update removes the entries.
I was certainly not expecting it in a master branch update.

Edit:

Entries in the voice speech dictionary can be lost for espeak voices after updating NVDA.

See STR and explanation here: #7592 (comment)

@feerrenrut
Copy link
Contributor

@Brian1Gaff When you say Espeak dictionaries, do you mean NVDA speech dictionaries (accessed via NVDA+n, preferences, speech dictionaries)?

Could you give us some more information:

  • Do you have a log file that you can upload?
  • What version were you updating from?
  • How was the update triggered?

@leonardder
Copy link
Collaborator

I'm not trying toe be harsh here, but you seem to experience a lot of problems related to updating NVDA noone else seems to have, or at least, you are the only one who reports them. Would it be possible to create a clean installation of NVDA on your pc? I suggest coming back to this issue if you are able to reliably reproduce it, otherwise, let's just treat it as an incident. Again, just my opinion, and my opinion is not in anyway equivalent to whatever law.

@Brian1Gaff
Copy link
Author

Brian1Gaff commented Sep 13, 2017 via email

@Mary5958
Copy link
Contributor

Could it be maybe the renaming of some eSpeak languages that have more forms, so for example what used to be only "English" before is now "English (Great Britain)"? So to get the dictionary working again you need to rename it accordingly or build a new one and move the contents of the old one to the new one.

@Brian1Gaff
Copy link
Author

Brian1Gaff commented Sep 14, 2017 via email

@Brian1Gaff
Copy link
Author

Brian1Gaff commented Sep 14, 2017 via email

@Brian1Gaff
Copy link
Author

Brian1Gaff commented Sep 14, 2017 via email

@Brian1Gaff
Copy link
Author

Brian1Gaff commented Sep 14, 2017 via email

@Mary5958
Copy link
Contributor

I would probably rename also the one in the speechDicts folder so that you would have it independently on the system area; BTW, it worked for me as I tested it here. I don't think the files would have renamed automatically in the update so whoever uses languages that have more forms will most likely experience the same. Anyway, nice that you got it working again!

@leonardder
Copy link
Collaborator

The voice renames are probably related to #7385.

@Brian1Gaff
Copy link
Author

Brian1Gaff commented Sep 15, 2017 via email

@Brian1Gaff
Copy link
Author

Brian1Gaff commented Sep 15, 2017 via email

@feerrenrut
Copy link
Contributor

I'm sorry, I'm having a hard time following this thread, I have tested this out and can reproduce the issue.

  1. Do a clean install of 2017.3 (first delete %appdata%/nvda)
  2. Ensure the synthesizer is set to espeak (NVDA settings, preferences, synthesizer)
  3. Ensure that the voice is set to english (NVDA settings, preferences, voice settings)
  4. Open settings, preferences, speech dictionaries, voice dictionary
  5. Add an obvious entry that you can look for later EG "NEW ENTRY IN 2017.3"
  6. Install latest master (I installed nvda_snapshot_master-14436,b73a9583)
  7. Open speech dictionaries, notice that "NEW ENTRY IN 2017.3" is missing.

Note

  • The file is still in %appdata%/nvda/speechDicts as espeak-english.dic
  • Looking at the following snippet from def loadVoiceDict in source/speechDictHandler.py, its clear that the name of the voice is being used rather than the ID of the voice.
voiceName = synth.availableVoices[synth.voice].name
fileName=r"%s\%s-%s.dic"%(speechDictsPath,synth.name,api.filterFileName(voiceName))

When fixing

There are two parts to fixing this, recover the "lost" espeak voice dict files, and improving the robustness of the voice dict files overall.

  1. To improve the robustness, and to be consistent with how we refer to a voice for a synth in the config file, we should move to use the ID of the voice instead of the voice name.
    • This will require a step to rename any existing files to the new format.
    • Consider that we can not load all synthesizers to get their IDs, some synthesizers may show a license agreement or similar. If this is not triggered by a user action it could be quite problematic for the user.
    • We need a reliable (and computationally cheap) way of determining if any files need to be updated for the current synth.
  2. To recover the espeak voice dict files we will need to manually create a mapping for each of the names of voices (languages, not variants) to their voice ID (as given by the synthesizer).
    • Because this is a known transformation, we do not need the espeak synth to be loaded to do it.

@feerrenrut feerrenrut added p1 Priority 1: highest bug labels Sep 18, 2017
@feerrenrut
Copy link
Contributor

Setting priority to P1 since this has the potential to affect a lot of users, and fixing before the 2017.4 release is likely to prevent a lot of clean up work.

Work around

For those experiencing this issue on next or master builds, You may take the following steps, but this may mean that the future fix will not apply correctly and you will have to manually fix the dictionary names. Alternatively you can revert to 2017.3 until this issue is fixed.

  1. Open %appdata%/nvda/speechDicts (perhaps first make a backup of this whole folder in case you make a mistake, just restore the folder)
  2. Move all espeak-*.dic files to a new location, for instance a 'espeakDicts` directory on your desktop.
  3. For each espeak-languageName.dic file in your desktop/espeakDicts/ folder (where languageName is an espeak voice name) EG: espeak-english.dic
    1. Open the nvda settings, preferences, voice settings dialog
    2. Set the most similar voice name and press ok., for instance in the case of espeak-english.dic, English (Great Britain)
    3. Open nvda settings, preferences, speech dictionaries, voice dictionary.
    4. Add an entry, EG test
    5. In %appdata%/nvda/speechDicts take note of the new espeak-languageName.dic file.
    6. Rename the equivalent file in your desktop/espeakDicts/ folder to match the new file in the previous step.
  4. Copy each file from desktop/espeakDicts/ into %appdata%/nvda/speechDicts overwriting the files there.

@Brian1Gaff
Copy link
Author

Brian1Gaff commented Sep 18, 2017 via email

@Brian1Gaff
Copy link
Author

Brian1Gaff commented Sep 18, 2017 via email

@PratikP1
Copy link

I encountered a similar issues when testing the OneCore voices during the 2017-3 development. I reported it in the OneCore thread but didn't escalate it as a bug. At some point in the development cycle for Windows 10 Fall Creators update, the voice names for OneCore voices changed and the dictionary files had to e renamed in order to reflect these changes.

@Brian1Gaff
Copy link
Author

Brian1Gaff commented Sep 18, 2017 via email

feerrenrut added a commit that referenced this issue Oct 17, 2017
Backup and move voice dict files, introduce a versioning scheme.
Espeak voice dictionaries are renamed to use the new name for voices to
avoide "lost" dictionaries.
Fixes #7592
@nvaccessAuto nvaccessAuto added this to the 2017.4 milestone Nov 1, 2017
feerrenrut added a commit that referenced this issue Nov 1, 2017
- Voice dictionary files are now versioned and have been moved to the
  'speechDicts/voiceDicts.v1' directory. (#7592)
- Versioned files (user configuration, voice dictionaries)
  modifications are no longer saved when NVDA is run from the launcher.
  (#7688)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug p1 Priority 1: highest
Projects
None yet
Development

No branches or pull requests

6 participants