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
Move voice dict files #7666
Move voice dict files #7666
Conversation
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
Well I have changed it to work on both cases of master and next.
The problem was never seemingly there on otherdictionaries like the sapi
ones at least for me, only Espeak. What was the actual reason for changing
the names in the first place?
Seems totally odd.
Another thing of course is that I am not happy with many of the uk English
pronounciations in recent versions of Espeak, its almost slurring some so
for which should be fore sounds like fur and lots of others.
|
@@ -0,0 +1,10 @@ | |||
# -*- coding: UTF-8 -*- | |||
#A part of NonVisual Desktop Access (NVDA) | |||
#Copyright (C) 2017 NVDA Contributors <http://www.nvda-project.org/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyright should be NV Access Limited now.
@Brian1Gaff , after this change you will need to manually fix your dictionary files again. This could be by reverting the name change you made, or by manually moving the files to the new folder. While this issue did not affect onecore or SAPI5, its best if all voice dictionaries follow the same conventions. |
Update copyright and some comments
Right, so effectively they will once again vanish and will be somewhere else
or just renamed in the same place?
I have to ask, why did they get renamed in the first place?
|
@Brian1Gaff we use the "name" property of a voice in the file name. Espeak updated the names of their voices, adding capital letters, and using more specific descriptions for the voices. This meant that the files needed the new name in order to "match up". I just tested this again, and it seems I misspoke. As long as you only have one copy of the voice dictionary then this will automatically move the dictionary to the new location. Regardless of whether the file uses the old name "espeak-english.dic" or the new name "espeak-English (Great Britain).dic". If there are both are present, you might not get the result you want, however all files are backed up to The files are moved to I hope this clears it up for you. |
Yes you are right. I had to in effect move the file from the back up to the
proper place as it had both old and new in the backup folder.
One issue I'd like to highlight here was that when in general settings you
hit the button to copy the system settings and you say ok to the add ons
etc, if any error occurs during that copy the error opens behind the bit
that bleeps and it bleeps for ever, never stopping.
I accidentally opened a file in the dictionary area in the system config in
roaming and of course it could not copy that file but it bleeped for a very
long time and then when I did a task switch I spotted the error sitting
there.
Might need some kind of error check in case people get a problem which is
entirely possible if they did as you suggest and move the files about!
Ahem. Another bug which has probably been in there since the roman Empire
fell!
Brian
bglists@blueyonder.co.uk
Sent via blueyonder.
Please address personal email to:-
briang1@blueyonder.co.uk, putting 'Brian Gaff'
in the display name field.
-----
|
When running from the launcher, dont upgrade NVDA config or move espeak voice dictionaries. Fixes #7688
Mick, when you get a chance, can you review the latest changes? This should address the concerns in #7688 |
source/config/__init__.py
Outdated
@@ -316,6 +316,10 @@ def __init__(self): | |||
self._shouldHandleProfileSwitch = True | |||
self._pendingHandleProfileSwitch = False | |||
self._suspendedTriggers = None | |||
# Never save the config if running securely or if running from the launcher. | |||
# When running from the launcher we dont save settings becuase the user may decide not to install this version, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
source/config/__init__.py
Outdated
@@ -316,6 +316,10 @@ def __init__(self): | |||
self._shouldHandleProfileSwitch = True | |||
self._pendingHandleProfileSwitch = False | |||
self._suspendedTriggers = None | |||
# Never save the config if running securely or if running from the launcher. | |||
# When running from the launcher we dont save settings becuase the user may decide not to install this version, | |||
# and these settings may not be compatible with with the already installed version. See #7688 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
source/config/__init__.py
Outdated
if globalVars.appArgs.secure: | ||
# Never save the config if running securely. | ||
if not self._shouldWriteProfile: | ||
log.info("Not writting profile, either --secure or --launcher args present") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
""" Do any upgrades required for the synth passed in. | ||
""" | ||
if globalVars.appArgs.launcher: | ||
# When running from the launcher we dont upgrade dicts becuase the user may decide not to install this version, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
""" | ||
if globalVars.appArgs.launcher: | ||
# When running from the launcher we dont upgrade dicts becuase the user may decide not to install this version, | ||
# and the dict location may not be compatible with with the already installed version. See #7688 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
source/config/profileUpgrader.py
Outdated
@@ -12,19 +12,22 @@ | |||
|
|||
SCHEMA_VERSION_KEY = "schemaVersion" | |||
|
|||
def upgrade(profile, validator): | |||
def upgrade(profile, validator, writeProfileToFileFunc, shouldWriteProfileToFile): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just support profileFileFunc being None and therefore saving won't happen, rather than requring the extra boolean?
I had to make a change to fix the unit tests, I will incubate this again. |
I just tried the latest master and it put a new dic file for espeak outside
of the voice or back up folders.
I had to move my working copy out to get it to be seen overwriting the
dummy one I created to see where Master had put it. Not sure if this is a
problem here or in the code. its been ok in Next but this is the first
chance I tried it in master as an installed version.
bglists@blueyonder.co.uk
Sent via blueyonder.
Please address personal email to:-
briang1@blueyonder.co.uk, putting 'Brian Gaff'
in the display name field.
-----
|
@Brian1Gaff This change hasn't made it to master yet, neither has the new espeak version. These are likely to be merged later this week. Swapping back and forth between master and next is likely to cause complications when there are changes incubating that to affect user config (including the dictionaries). |
Hmm yes, I tend to have Master set as the installed version and next as the
portable.
When all of this is up to speed then I can tidy up the folders I hope
Does the new espeak version sort out any of the more recent alterations to
the way words are said?
I have rules for many of them. I do not really want to go to RP version of
UK English, but find some of the lazy pronounciations a bit irritating.
Brian
|
I'm not sure if it fixes the pronunciations, this version is currently in use on the |
I'm not on that one. I have so many of these things going and so I find it
hard to always understand what they are actually talking about over there..
grin.
Brian
bglists@blueyonder.co.uk
Sent via blueyonder.
Please address personal email to:-
briang1@blueyonder.co.uk, putting 'Brian Gaff'
in the display name field.
----- Original Message -----
From: "Reef Turner" <notifications@github.com>
To: "nvaccess/nvda" <nvda@noreply.github.com>
Cc: "Brian Gaff" <bglists@blueyonder.co.uk>; "Mention"
<mention@noreply.github.com>
…Sent: Tuesday, October 31, 2017 1:55 AM
Subject: Re: [nvaccess/nvda] Move voice dict files (#7666)
I'm not sure if it fixes the pronunciations, this version is currently in
use on the `next` branch. If you have specific examples, I would suggest
that you create a new issue on the
[espeak-ng](https://github.com/espeak-ng/espeak-ng/issues) repository.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#7666 (comment)
|
Link to issue number:
#7592
Summary of the issue:
Espeak voice names have changed, voice dictionaries use the voice name in their filename, now NVDA is not able to find the dictionaries with the new voice name.
Description of how this pull request fixes the issue:
This PR uses a mapping of the old to new espeak voice names to rename the dictionary files. Old files are backed up to preserve the old name in case something goes wrong. The files are put into a versioned directory to make future updates to the names possible.
Testing performed:
Created a default dictionary, and a voice dictionary for each of the synths on my system (espeak, SAPI5, OneCore) using NVDA 2017.3.
Copied these into the branch, and ensured that the dictionaries can be loaded.
Known issues with pull request:
This does not use the voice ID, so future regressions due to name changes of synth voices are possible. This was done because synths such as SAPI5 and OneCore use registry paths as their ID's. These are not friendly to end users, who should be able to manually identify and manage their dictionary files. These long ID's also run the risk of creating file paths that exceed maximum length.
Any users on master or next builds who have created new dictionary entries, or renamed old dictionaries to work with espeak will have to manually fix their dictionary files.
Change log entry:
In Changes:
- Voice dictionary files are now versioned and have been moved to the 'speechDicts/voiceDicts.v1' directory. (#7592)