Skip to content
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

Adding set language at run time #34

Merged
merged 3 commits into from
May 20, 2021
Merged

Adding set language at run time #34

merged 3 commits into from
May 20, 2021

Conversation

vtikha
Copy link
Member

@vtikha vtikha commented May 19, 2021

This PR adds the possibility to change the language at run time.

The user is now able to modify the language through the following rpc command. As one is also required to set a corresponding voice , we condensed the command to include both entries in one for ease of use. (Otherwise the user will have to send two distinct commands)

Example of the language switch:

setLanguage en-US en-US-Wavenet-D

by default, the language and voice codes currently supported are the following, but can be easily extended by adding the required entries in the config.ini

languageCodes     en-US it-IT pt-PT fr-FR en-GB
voiceCodes        en-US-Wavenet-A en-US-Wavenet-B en-US-Wavenet-C en-US-Wavenet-D en-US-Wavenet-E en-US-Wavenet-F en-US-Wavenet-G en-US-Wavenet-H en-US-Wavenet-I en-US-Wavenet-J fr-FR-Wavenet-A fr-FR-Wavenet-B fr-FR-Wavenet-C fr-FR-Wavenet-D en-GB-Wavenet-A en-GB-Wavenet-B en-GB-Wavenet-C en-GB-Wavenet-D pt-PT-Wavenet-A pt-PT-Wavenet-B pt-PT-Wavenet-C pt-PT-Wavenet-D it-IT-Wavenet-A it-IT-Wavenet-B it-IT-Wavenet-C it-IT-Wavenet-D

Here is a list of the possible interaction with the module

setLanguage(1:string languageCode, 2:string voiceCode);
setPitch(1:double pitch);
setSpeed(1:double speed);
getLanguageCode();
getVoiceCode();
getPitch();
getSpeed();

cc @randaz81 @Bontempogianpaolo1

@vtikha vtikha self-assigned this May 19, 2021
@vtikha vtikha changed the title Update main.cpp Adding set language at run time May 19, 2021
@vtikha vtikha marked this pull request as ready for review May 19, 2021 10:08
Copy link
Contributor

@lauracavaliere lauracavaliere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look good to me, thank you.

Copy link
Contributor

@ilaria-carlini ilaria-carlini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @vtikha! 🚀 LGTM too!

@traversaro
Copy link
Member

Perhaps we could to a tag after this PR and release this as part of 2021.05 ?

@vtikha
Copy link
Member Author

vtikha commented May 19, 2021

Perhaps we could to a tag after this PR and release this as part of 2021.05 ?

Yes, but we have a couple more PRs to do in this repo. Once we finish with the other then for sure

@Bontempogianpaolo1
Copy link

Cool! It Looks great!

@vtikha vtikha merged commit f753fb6 into master May 20, 2021
@vtikha vtikha deleted the set-language branch May 20, 2021 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants