Codepage problem with Balabolka(?)

Questions about Wine on Linux
Locked
oscareczek
Level 1
Level 1
Posts: 7
Joined: Fri Dec 11, 2020 3:55 am

Codepage problem with Balabolka(?)

Post by oscareczek »

Devuan Stable, Wine 5.0.3 from Wine repo + winetricks speechsdk, LANG=pl_PL.UTF-8
I use balcon from Balabolka to generate sound files from SAPI5 voices. One of the voices is called Penélope and I have a lot of trouble making it to work.
Normally, I make voices by a command (example shows Microsoft Sam, just to show you don't need to type full name):

Code: Select all

wine balcon -f text.txt -enc utf8 -n Sam -w filename.wav
However, with Penélope, I get an error:

Code: Select all

Error: file saving error (OLE error 8004503A)
"wine balcon -l" shows this voice as IVONA 2 PenÚlope, but choosing this voice results in:

Code: Select all

Error: voice not selected
LANG=es_US.UTF-8 doesn't change anything
When I set LANG=es_US (because that's the language of this voice), it's shown as IVONA 2 Pen<0xFFFD>lope, character for é in CP1252 is E9, so I tried typing both Penélope and Pen\351lope, but again, voice not selected.
Changing LC_CTYPE gets the same result as changing LANG. Log doesn't show any difference between Penélope and and any other voice.
While changing the name in HKLM\Software\Microsoft\Speech\Voices\Tokens\name of voice\Attributes helps in choosing the voice, it can't be done, because I get a different error, possibly relating to being unable to find a voice:

Code: Select all

0009:fixme:advapi:RegisterEventSourceA ((null),"IVONA 2 Voice"): stub
0009:fixme:advapi:RegisterEventSourceW (L"",L"IVONA 2 Voice"): stub
0009:fixme:advapi:ReportEventA (0xcafe4242,0x0001,0x0000,0x00001008,(nil),0x0001,0x00000000,0x9b558a0,(nil)): stub
0009:fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x00001008,(nil),0x0001,0x00000000,0x105d790,(nil)): stub
0009:err:eventlog:ReportEventW L"IVONA 2 Voice Penelope22"
0009:fixme:advapi:DeregisterEventSource (0xcafe4242) stub
0009:fixme:ver:GetCurrentPackageId (0x32ebb4 (nil)): stub
0009:fixme:advapi:RegisterEventSourceA ((null),"IVONA 2 Voice"): stub
0009:fixme:advapi:RegisterEventSourceW (L"",L"IVONA 2 Voice"): stub
0009:fixme:advapi:ReportEventA (0xcafe4242,0x0001,0x0000,0x00001008,(nil),0x0001,0x00000000,0x9b55770,(nil)): stub
0009:fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x00001008,(nil),0x0001,0x00000000,0x105a960,(nil)): stub
0009:err:eventlog:ReportEventW L"IVONA 2 Voice Penelope22"
0009:fixme:advapi:DeregisterEventSource (0xcafe4242) stub
0009:fixme:ver:GetCurrentPackageId (0x32eaa4 (nil)): stub
0009:fixme:advapi:RegisterEventSourceA ((null),"IVONA 2 Voice"): stub
0009:fixme:advapi:RegisterEventSourceW (L"",L"IVONA 2 Voice"): stub
0009:fixme:advapi:ReportEventA (0xcafe4242,0x0001,0x0000,0x00001008,(nil),0x0001,0x00000000,0x9b55770,(nil)): stub
0009:fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x00001008,(nil),0x0001,0x00000000,0x1060258,(nil)): stub
0009:err:eventlog:ReportEventW L"IVONA 2 Voice Penelope22"
0009:fixme:advapi:DeregisterEventSource (0xcafe4242) stub
0009:fixme:ver:GetCurrentPackageId (0x32f55c (nil)): stub
0009:fixme:advapi:RegisterEventSourceA ((null),"IVONA 2 Voice"): stub
0009:fixme:advapi:RegisterEventSourceW (L"",L"IVONA 2 Voice"): stub
0009:fixme:advapi:ReportEventA (0xcafe4242,0x0001,0x0000,0x00001008,(nil),0x0001,0x00000000,0x9b55770,(nil)): stub
0009:fixme:advapi:ReportEventW (0xcafe4242,0x0001,0x0000,0x00001008,(nil),0x0001,0x00000000,0x1060700,(nil)): stub
0009:err:eventlog:ReportEventW L"IVONA 2 Voice Penelope22"
0009:fixme:advapi:DeregisterEventSource (0xcafe4242) stub

Error: file saving error (OLE error 80004004)
What else can I do?
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: Codepage problem with Balabolka(?)

Post by jkfloris »

Does the voice work in an other program?

Code: Select all

cd .wine/drive_c/Program Files/Microsoft\ Speech\ SDK\ 5.1/Bin
wine TTSApp.exe
If this works, try Penélope (even if it says something else) in Balcon:

Code: Select all

wine cmd

Microsoft Windows 5.1.2600

C:\balcon>balcon -l
0104:err:ole:com_get_class_object class {d941651c-44e6-4c17-badf-c36826fc3424} not registered
0104:err:ole:create_server class {d941651c-44e6-4c17-badf-c36826fc3424} not registered
0104:err:ole:com_get_class_object no class object {d941651c-44e6-4c17-badf-c36826fc3424} could be created for context 0x5
0104:err:ole:com_get_class_object class {cb96b400-c743-11cd-80e5-00aa003e4b50} not registered
0104:err:ole:com_get_class_object class {cb96b400-c743-11cd-80e5-00aa003e4b50} not registered
0104:err:ole:create_server class {cb96b400-c743-11cd-80e5-00aa003e4b50} not registered
0104:err:ole:com_get_class_object no class object {cb96b400-c743-11cd-80e5-00aa003e4b50} could be created for context 0x7

SAPI 5:
  IVONA 2 PenÚlope
  Microsoft Mary
  Microsoft Mike
  Microsoft Sam
  SampleTTSVoice

C:\balcon>balcon -f readme.eng.txt -n Penélope -w test.wav
0124:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0031F454 1 C) semi-stub
0124:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0031F6DC 1 C) semi-stub
0124:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0031F58C 1 C) semi-stub
0124:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0031F6AC 1 C) semi-stub
0148:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (041FF71C 1 C) semi-stub
0148:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (041FF62C 1 C) semi-stub
0148:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (041FF7AC 1 C) semi-stub
0124:fixme:msvcrt:__clean_type_info_names_internal (0254F180) stub
0124:fixme:msvcrt:__clean_type_info_names_internal (024E6468) stub
0124:fixme:msvcrt:__clean_type_info_names_internal (02254D28) stub
0124:fixme:msvcrt:__clean_type_info_names_internal (67208D08) stub
0124:fixme:msvcrt:__clean_type_info_names_internal (100D5E10) stub
0124:fixme:msvcrt:__clean_type_info_names_internal (019CB2F8) stub

oscareczek
Level 1
Level 1
Posts: 7
Joined: Fri Dec 11, 2020 3:55 am

Re: Codepage problem with Balabolka(?)

Post by oscareczek »

jkfloris wrote: Fri Dec 18, 2020 10:31 am Does the voice work in an other program?
It works if I invoke it with SAPI5 tag.
jkfloris wrote: Fri Dec 18, 2020 10:31 am If this works, try Penélope (even if it says something else) in Balcon
oscareczek wrote: Fri Dec 11, 2020 4:48 am "wine balcon -l" shows this voice as IVONA 2 PenÚlope, but choosing this voice results in:

Code: Select all

Error: voice not selected
LANG=es_US.UTF-8 doesn't change anything
When I set LANG=es_US (because that's the language of this voice), it's shown as IVONA 2 Pen<0xFFFD>lope, character for é in CP1252 is E9, so I tried typing both Penélope and Pen\351lope, but again, voice not selected.
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: Codepage problem with Balabolka(?)

Post by jkfloris »

Does it work if you use LANG=C with the -id "0x540A" option?

Code: Select all

$ LANG=C wine cmd

Microsoft Windows 5.1.2600

c:\>cd balcon

c:\balcon>balcon -l
0100:err:ole:com_get_class_object class {d941651c-44e6-4c17-badf-c36826fc3424} not registered
0100:err:ole:create_server class {d941651c-44e6-4c17-badf-c36826fc3424} not registered
0100:err:ole:com_get_class_object no class object {d941651c-44e6-4c17-badf-c36826fc3424} could be created for context 0x5
0100:err:ole:com_get_class_object class {cb96b400-c743-11cd-80e5-00aa003e4b50} not registered
0100:err:ole:com_get_class_object class {cb96b400-c743-11cd-80e5-00aa003e4b50} not registered
0100:err:ole:create_server class {cb96b400-c743-11cd-80e5-00aa003e4b50} not registered
0100:err:ole:com_get_class_object no class object {cb96b400-c743-11cd-80e5-00aa003e4b50} could be created for context 0x7

SAPI 5:
  IVONA 2 Pen?lope
  Microsoft Mary
  Microsoft Mike
  Microsoft Sam
  SampleTTSVoice

c:\balcon>balcon -id "0x540A" -m
0154:err:ole:com_get_class_object class {d941651c-44e6-4c17-badf-c36826fc3424} not registered
0154:err:ole:create_server class {d941651c-44e6-4c17-badf-c36826fc3424} not registered
0154:err:ole:com_get_class_object no class object {d941651c-44e6-4c17-badf-c36826fc3424} could be created for context 0x5
0154:err:ole:com_get_class_object class {cb96b400-c743-11cd-80e5-00aa003e4b50} not registered
0154:err:ole:com_get_class_object class {cb96b400-c743-11cd-80e5-00aa003e4b50} not registered
0154:err:ole:create_server class {cb96b400-c743-11cd-80e5-00aa003e4b50} not registered
0154:err:ole:com_get_class_object no class object {cb96b400-c743-11cd-80e5-00aa003e4b50} could be created for context 0x7
0154:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0031F464 1 C) semi-stub
0154:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0031F6DC 1 C) semi-stub
0154:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0031F59C 1 C) semi-stub
0154:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0031F6AC 1 C) semi-stub

Name: IVONA 2 Pen?lope
Description: IVONA 2 Pen?lope - Spanish (US) female voice [22kHz]
Vendor: IVONA Software Sp. z o. o.
Age: Adult
Gender: Female
Language:
Number of channels: 1
Samples per second: 22050
Bits per sample: 16
0154:fixme:msvcrt:__clean_type_info_names_internal (0240F180) stub
0154:fixme:msvcrt:__clean_type_info_names_internal (023A6468) stub
0154:fixme:msvcrt:__clean_type_info_names_internal (02114D28) stub
0154:fixme:msvcrt:__clean_type_info_names_internal (67208D08) stub
0154:fixme:msvcrt:__clean_type_info_names_internal (100D5E10) stub
0154:fixme:msvcrt:__clean_type_info_names_internal (0188B2F8) stub

c:\balcon>balcon -id "0x540A" -f readme.eng.txt -w test.wav
0124:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0031F454 1 C) semi-stub
0124:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0031F6DC 1 C) semi-stub
0124:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0031F58C 1 C) semi-stub
0124:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (0031F6AC 1 C) semi-stub
0148:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (041FF71C 1 C) semi-stub
0148:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (041FF62C 1 C) semi-stub
0148:fixme:msvcp:_Locinfo__Locinfo_ctor_cat_cstr (041FF7AC 1 C) semi-stub
0124:fixme:msvcrt:__clean_type_info_names_internal (0254F180) stub
0124:fixme:msvcrt:__clean_type_info_names_internal (024E6468) stub
0124:fixme:msvcrt:__clean_type_info_names_internal (02254D28) stub
0124:fixme:msvcrt:__clean_type_info_names_internal (67208D08) stub
0124:fixme:msvcrt:__clean_type_info_names_internal (100D5E10) stub
0124:fixme:msvcrt:__clean_type_info_names_internal (019CB2F8) stub

oscareczek
Level 1
Level 1
Posts: 7
Joined: Fri Dec 11, 2020 3:55 am

Re: Codepage problem with Balabolka(?)

Post by oscareczek »

I have two voices in Spanish (US) and `balcon -id "0x540A" -m` gets me the male one. I can't see any option to specify gender, unfortunately.
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: Codepage problem with Balabolka(?)

Post by jkfloris »

Maybe: balcon -n "IVONA 2 Pen" -m
oscareczek
Level 1
Level 1
Posts: 7
Joined: Fri Dec 11, 2020 3:55 am

Re: Codepage problem with Balabolka(?)

Post by oscareczek »

When I saw this reply I thought "well, it will probably work, it's ugly, but what can you do" and while it correctly shows the voice:

Code: Select all

Name: IVONA 2 PenÚlope
Description: IVONA 2 PenÚlope - hiszpa˝ski ameryka˝ski g│os ┐e˝ski [22kHz]
Vendor: IVONA Software Sp. z o. o.
Age: Adult
Gender: Female
Language: 
Number of channels: 1
Samples per second: 22050
Bits per sample: 16
or with LANG=es_US.UTF-8:

Code: Select all

Name: IVONA 2 PenÚlope
Description: IVONA 2 PenÚlope - hiszpanski amerykanski glos zenski [22kHz]
Vendor: IVONA Software Sp. z o. o.
Age: Adult
Gender: Female
Language: 
Number of channels: 1
Samples per second: 22050
Bits per sample: 16
…it still triggers this error while trying to save:

Code: Select all

Error: file saving error (OLE error 8004503A)
even though I only use ASCII in the entire command and all the paths. This problem doesn't happen in any voice whose name is ASCII (description doesn't seem to matter, all of the non-ASCII characters appear in other voices and they work fine). I wish I could share a longer log, but it's the only difference from the command made with the voice that works.
oscareczek
Level 1
Level 1
Posts: 7
Joined: Fri Dec 11, 2020 3:55 am

Re: Codepage problem with Balabolka(?)

Post by oscareczek »

Update: I didn't notice before, but apparently Miguel (which is es_US male voice) throws the exact same error, so the problem isn't about the name itself.
oscareczek
Level 1
Level 1
Posts: 7
Joined: Fri Dec 11, 2020 3:55 am

Re: Codepage problem with Balabolka(?)

Post by oscareczek »

Another update: the issue is whatever value is stored in HKLM\Software\Microsoft\Speech\Voices\Tokens\name of voice\Attributes\Language.
If it's set to 540a (es-US) or 452 (cy-GB), the program freaks out. As you can see in a post from 20th December, the Language field is empty, because balcon was unable to get a name of a language with these codes.
With es-US, there's an easy fix: just change this value to c0a (es-ES), the differences are probably non-existent. I still don't understand why I can't launch it without this modification, jkfloris' log clearly shows it shouldn't be a problem, his balcon -m also didn't show the language name.
That's not the case with Welsh voices, though, because the only difference between Welsh and Welsh English voice in registry is the Language value.
Locked