To make this work properly, you need to make sure you have the right speech pack installed:
The other thing, is to make sure the voices you want to use are enabled correctly.
On Windows 10 – and I have not tested this on anything else, so use it at your own risk!
You will need to run a PowerShell Script, as outlined here: https://gist.github.com/hiepxanh/8b6ad80f6d620cd3eaaaa5c1d2c660b2
add-voice.ps
$sourcePath = 'HKLM:\software\Microsoft\Speech_OneCore\Voices\Tokens' #Where the OneCore voices live $destinationPath = 'HKLM:\SOFTWARE\Microsoft\Speech\Voices\Tokens' #For 64-bit apps $destinationPath2 = 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\SPEECH\Voices\Tokens' #For 32-bit apps cd $destinationPath $listVoices = Get-ChildItem $sourcePath foreach($voice in $listVoices) { $source = $voice.PSPath #Get the path of this voices key copy -Path $source -Destination $destinationPath -Recurse copy -Path $source -Destination $destinationPath2 -Recurse }
Do NOT run this script more than once, because you will get double entries, and who knows if it will break things.
Basically, what it will do is read the voices you have listed as installed, and then copy some registry values to enable them in third party programs, as explained here: https://www.ghacks.net/2018/08/11/unlock-all-windows-10-tts-voices-system-wide-to-get-more-of-them/
If you don’t understand Power Shell, or Regedit, then don’t be running these scripts.
Sometimes, you may get security problems, so elevating the script may also be required.
This is what happens when the aforementioned happens.
However, when it does run, our registry entries look like this originally:
Then, they look like this:
Next steps are getting a program called Balabolka.
http://www.cross-plus-a.com/bconsole.htm
We are going to need the console version for this task.
If you don’t have the correct voice fix installed, you will not be able to use the correct voice you want.
I wanted to have James, but I couldn’t.
But after those fixes, James worked.
I’d also suggest that if you want to script this, it may be easier to use a config file.
balcon.cfg
-f c:\balabolka\script.txt -w c:\balabolka\script.wav -n James -s -1 -p -1 -v 95 -e 300 -d d:\Dict\rules.bxd
So, when you now run balcon.exe, you get a wave file with the text file the script.
You can listen to the weather script here without any fixes. This is the Microsoft James voice.
After fixing the paragraphs and changing the voice, this is the Microsoft Catherine voice.
It doesn’t sound great at first, but it’s workable. You can also hear where the end of the line is. This can probably fixed with automation, but it’s a bit of fun.
This is where the script came from: ftp://ftp.bom.gov.au/anon/gen/fwo/IDD10111.txt
If will not be the same as this one below, as it changes regularly, but as an example, you get the idea.
As a trial run, this is the script:
IDD10111 Australian Government Bureau of Meteorology Northern Territory Northern Territory Forecast Issued at 5:00 am CST on Wednesday 17 June 2020 for the period until midnight CST Saturday 20 June 2020. Warning Information For latest warnings go to www.bom.gov.au, subscribe to RSS feeds, call 1300 659 210* or listen for warnings on relevant TV and radio broadcasts. Weather Situation A high pressure system over southern Australia is moving east as the next trough approaches from WA. While the easterly flow will persist over the Top End for the next few days, winds in the south will tend northerly, resulting in temperatures rising again in the south. The change will move through late on Friday, dropping temperatures in the south to around average for this time of year. Forecast for the rest of Wednesday 17 June A slight chance of showers in the far northeast Arnhem District. Sunny elsewhere. Light to moderate east to southeast winds, fresh at times during the morning and early afternoon, particularly south of Elliot. Fire Danger: High to Very High in the Tiwi, Daly, Gregory, Carpentaria and western Arnhem Districts. Forecast for Thursday 18 June A slight chance of morning showers in the far northeast Arnhem District. Sunny elsewhere. Areas of morning frost across the Simpson District. A warmer day in the south. Light to moderate east to southeast winds, tending northeast to northwest in the southern Tanami, western Simpson and Lasseter Districts during the afternoon. Forecast for Friday 19 June A slight chance of showers in the far eastern Arnhem District. Sunny elsewhere before some cloud develops along the eastern border during the evening. Warmer in the south. Light to moderate east to southeast winds, tending northeast to northwest south of Barrow Creek ahead of a south to southwest change developing over the Lasseter District later in the day. Forecast for Saturday 20 June A slight to medium chance of showers in the far eastern Arnhem District. Sunny elsewhere after early morning cloud along the eastern border. Cooler south of Barrow Creek. Light to moderate east to southeast winds, fresh and gusty during the morning in the Lasseter and Simpson Districts. The next routine forecast will be issued at 4:30 pm CST Wednesday. * Calls to 1300 numbers cost around 27.5c inc GST, higher from mobiles or public phones. Copyright Commonwealth of Australia 2011, Bureau of Meteorology (ABN 92 637 533 532). Users of these web pages are deemed to have read and accepted the conditions described in the Copyright, Disclaimer, and Privacy statements (http://www.bom.gov.au/other/copyright.shtml).
As a side note, there is also Amazon Polly and Google’s Cloud Text-to-Speech.
Leave a Reply