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

Make it possible to select TTS engine when you add voice #62

Merged
merged 1 commit into from
Jun 27, 2020
Merged

Conversation

uezo
Copy link
Owner

@uezo uezo commented Jun 27, 2020

Configure on application starts.

// Add AzureTTS as default engine
var azureTTSLoader = new AzureTTSLoader("YOUR API KEY");
modelController.RegisterTTSFunction("azure", azureTTSLoader.GetAudioClipAsync, true);

// Add Voiceroid
var voiceroidTTSLoader = new VoiceroidTTSLoader("ENDPOINT URL");
modelController.RegisterTTSFunction("voiceroid", voiceroidTTSLoader.GetAudioClipAsync);

Set Text-to-Speech Function name when create TTSConfig instance.

var ttsConfig = new TTSConfiguration("voiceroid");
ttsConfig.Params.Add("Volume", 2.5f);
animatedVoiceRequest.AddVoiceTTS("Hello", ttsConfig: ttsConfig);
animatedVoiceRequest.AddVoiceTTS("How are you?", ttsConfig: ttsConfig);

Configure on application starts.

```Csharp
// Add AzureTTS as default engine
var azureTTSLoader = new AzureTTSLoader("YOUR API KEY");
modelController.RegisterTTSFunction("azure", azureTTSLoader.GetAudioClipAsync, true);

// Add Voiceroid
var voiceroidTTSLoader = new VoiceroidTTSLoader("ENDPOINT URL");
modelController.RegisterTTSFunction("voiceroid", voiceroidTTSLoader.GetAudioClipAsync);
```

Set Text-to-Speech Function name when create TTSConfig instance.

```Csharp
var ttsConfig = new TTSConfiguration("voiceroid");
ttsConfig.Params.Add("Volume", 2.5f);
animatedVoiceRequest.AddVoiceTTS("Hello", ttsConfig: ttsConfig);
animatedVoiceRequest.AddVoiceTTS("How are you?", ttsConfig: ttsConfig);
```
@uezo uezo merged commit 6588938 into master Jun 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant