speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Allow actually setting the synthesis voice when then generic module is u


From: Didier Spaier
Subject: Allow actually setting the synthesis voice when then generic module is used
Date: Thu, 11 Oct 2018 00:33:11 +0200

Hello,

On 10/10/18 1:50 AM, Samuel Thibault wrote:
> Hello,
> 
> Didier Spaier, le mer. 10 oct. 2018 00:41:56 +0200, a ecrit:
>> +char *module_setvoice(char *voicename)
>> +{
>> +    int i;
>> +    for (i = 0; generic_voices_list[i] != NULL; i++) {
>> +    if (strcasecmp(generic_voices[i].name, voicename) == 0)
>> +            return voicename;
>> +    }
>> +    return NULL;
>> +}
> 
> It seems odd to call this function module_setvoice since it does not
> actually set anything, it just tests the presence in the list. Perhaps
> rather call it module_existsvoice and make it return a gboolean?
> 
> Samuel

The updated attached patch addresses this concern.

Logic implemented:

If the voice name is set by the client the language and voice types are
not considered.
if the voice name is not set by the client it is deducted from the
language and the voice type, set as default values or by the client,
as previously.

This implies that if the voice name voice is set by the client, the
language and voice type (set as default values or by the client) can
differ from those associated to the voice name in the configuration
file, but I don't think that matters: if the voice name is set by the
client it should have priority over what the AddVoice line says.

Didier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: set_synthesis_voice_generic.diff
Type: text/x-patch
Size: 2772 bytes
Desc: not available
URL: 
<http://lists.freebsoft.org/pipermail/speechd/attachments/20181011/f07fe0b2/attachment.bin>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]