Author Topic: Cant find trained speech library file  (Read 3286 times)

philvb

  • Newbie
  • *
  • Posts: 1
Cant find trained speech library file
« on: May 13, 2021, 09:31:40 AM »
I have just reinstalled Windows and all my apps/programs after purchasing a new M2 SSD disk. I have re-imported my VoiceAttack profile with all my commands, but it turns out the very few of my spoken commands are recognized. I have found out that the Windows Speech recognition library where I had specifically trained most of the commands, is now empty, and have concluded that is what is my problem.
I was really planning this process so as to secure all my profiles and stuff and I still have the old Windows system disk available to search for files. I have found some some files in the "..users/"username"/appData/local/Microsoft/Speech" that looked promising, but copy/pasting them into the new system folders did not help.

Can anyone tell me where I find the "trained" speech library so I don't have to go through the very time consuming work to train all the command again.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4786
  • RTFM
Re: Cant find trained speech library file
« Reply #1 on: May 13, 2021, 09:36:54 AM »
There is a tool to back up your speech recognition profile (download link in the "Back up your speech engine training file" section here), however that is intended to be used on a running system.

Exergist

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 405
  • Ride the lightning
Re: Cant find trained speech library file
« Reply #2 on: May 13, 2021, 11:41:03 AM »
It is possible to backup and restore the contents of your speech dictionary (different than your speech recognition profile). For reference, the speech dictionary contains custom words that you "teach" so that the speech engine may:
  • Better pronounce the custom words via text-to-speech
  • Better recognize your pronunciation of the custom words

Backing Up Your Speech Dictionary
  • Navigate to "...users...YourUserName\AppData\Roaming\Microsoft\Speech\Files\UserLexicons." Inside this folder is a dat file that contains your speech dictionary data.
  • Copy the dat file and store it somewhere safe.

Restoring Your Speech Dictionary from a Backup
First, some background. The file you just copied (see above steps) was originally created when the Windows Speech Engine was first engaged. This may be at Windows installation (I'm honestly not sure there), but it definitely happens (if the file still didn't exist) when you start VoiceAttack. As you might guess, the file is empty when created. Whenever you make changes to the Speech Dictionary via the native Windows interface, this file is updated. Since it is a dat file you cannot view the contents readily (there may be ways to do it, I'm just saying I don't know a way currently), but you CAN manipulate the file itself. How you proceed from here depends on whether or not your backup file (MyDictionaryName.dat) is named the same as the file currently in your UserLexicons folder.

If your backup file and the file currently in UserLexicons have the SAME name:
  • Copy your backup dat file
  • Paste your backup dat file in the UserLexicons folder. You should be asked if you want to overwrite the file (say Yes).
  • (Optional) Open the Speech Dictionary interface and verify your backup was actually applied (check the word list via "Change existing words" -> "Edit a word"
If your backup file and the file currently in UserLexicons have DIFFERENT names:
  • Copy the name of the dat file currently in the UserLexicons folder (copy "MyDifferentFile" in MyDifferentFile.dat).
  • Rename your backup dat file as the copied file name (rename MyBackupFile.dat as MyDifferentFile.dat).
  • Copy the renamed backup file.
  • Paste the copied file in the UserLexicons folder. You should be asked if you want to overwrite the file (say Yes).
  • (Optional) Open the Speech Dictionary interface and verify your backup was actually applied (check the word list via "Change existing words" -> "Edit a word"

Cheers! :)