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

Comments

Projects
None yet
6 participants
@Brian1Gaff

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

This comment has been minimized.

Show comment
Hide comment
@feerrenrut

feerrenrut Sep 13, 2017

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?
Contributor

feerrenrut commented Sep 13, 2017

@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

This comment has been minimized.

Show comment
Hide comment
@leonardder

leonardder Sep 13, 2017

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.

Collaborator

leonardder commented Sep 13, 2017

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

This comment has been minimized.

Show comment
Hide comment
@Brian1Gaff

Brian1Gaff Sep 13, 2017

Brian1Gaff commented Sep 13, 2017

@Mary5958

This comment has been minimized.

Show comment
Hide comment
@Mary5958

Mary5958 Sep 13, 2017

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.

Mary5958 commented Sep 13, 2017

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

This comment has been minimized.

Show comment
Hide comment
@Brian1Gaff

Brian1Gaff Sep 14, 2017

Brian1Gaff commented Sep 14, 2017

@Brian1Gaff

This comment has been minimized.

Show comment
Hide comment
@Brian1Gaff

Brian1Gaff Sep 14, 2017

Brian1Gaff commented Sep 14, 2017

@Brian1Gaff

This comment has been minimized.

Show comment
Hide comment
@Brian1Gaff

Brian1Gaff Sep 14, 2017

Brian1Gaff commented Sep 14, 2017

@Brian1Gaff

This comment has been minimized.

Show comment
Hide comment
@Brian1Gaff

Brian1Gaff Sep 14, 2017

Brian1Gaff commented Sep 14, 2017

@Mary5958

This comment has been minimized.

Show comment
Hide comment
@Mary5958

Mary5958 Sep 14, 2017

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!

Mary5958 commented Sep 14, 2017

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

This comment has been minimized.

Show comment
Hide comment
@leonardder

leonardder Sep 15, 2017

Collaborator

The voice renames are probably related to #7385.

Collaborator

leonardder commented Sep 15, 2017

The voice renames are probably related to #7385.

@Brian1Gaff

This comment has been minimized.

Show comment
Hide comment
@Brian1Gaff

Brian1Gaff Sep 15, 2017

Brian1Gaff commented Sep 15, 2017

@Brian1Gaff

This comment has been minimized.

Show comment
Hide comment
@Brian1Gaff

Brian1Gaff Sep 15, 2017

Brian1Gaff commented Sep 15, 2017

@feerrenrut

This comment has been minimized.

Show comment
Hide comment
@feerrenrut

feerrenrut Sep 18, 2017

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.
Contributor

feerrenrut commented Sep 18, 2017

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 bug labels Sep 18, 2017

@feerrenrut

This comment has been minimized.

Show comment
Hide comment
@feerrenrut

feerrenrut Sep 18, 2017

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.
Contributor

feerrenrut commented Sep 18, 2017

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

This comment has been minimized.

Show comment
Hide comment
@Brian1Gaff

Brian1Gaff Sep 18, 2017

Brian1Gaff commented Sep 18, 2017

@Brian1Gaff

This comment has been minimized.

Show comment
Hide comment
@Brian1Gaff

Brian1Gaff Sep 18, 2017

Brian1Gaff commented Sep 18, 2017

@PratikP1

This comment has been minimized.

Show comment
Hide comment
@PratikP1

PratikP1 Sep 18, 2017

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.

PratikP1 commented Sep 18, 2017

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

This comment has been minimized.

Show comment
Hide comment
@Brian1Gaff

Brian1Gaff Sep 18, 2017

Brian1Gaff commented Sep 18, 2017

feerrenrut added a commit that referenced this issue Oct 17, 2017

Move voice dict files
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 feerrenrut closed this in d63f4ed Nov 1, 2017

feerrenrut added a commit that referenced this issue Nov 1, 2017

Update changes file for PR #7666
- 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