-
Notifications
You must be signed in to change notification settings - Fork 4
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
Is it possible to select the voice beside the language? #3
Comments
Hello, thanks for your feedback! I belive it is possible to do it in the SDK but not in the plugin at the moment. I can implement it, if you are willing to test |
Hello! Yes! I'm willing to test this. |
Very good. Are you using the plugin through Ionic or via cordova? |
Through Ionic |
Thanks for the info. The implementation is in progress, but I'll be away for a week, so no progress in the next week. |
Hi, the voice parameter is added in version 2.0.0. The sample app is updated to reflect these changes. The caveat here is ionic-native, which takes time to approve pull requests. The pull request to watch is danielsogl/awesome-cordova-plugins#2761 If you are eager to check it out now, I can send the compiled code (or you can clone https://github.com/Shmarkus/ionic-native repository and build the distribution package. from there, copy dist/@ionic-native/speechkit to your projects node_modules/@ionic-native/speechkit |
Please note that IOS is currently untested. |
Ionic pull request merged |
Thank you |
While trying to compile the iOS version, I'm getting this error: ......./Plugins/cordova-plugin-nuance-speechkit/CDVSpeechKit.m:32:43: No visible @interface for 'SKSession' declares the selector 'speakString:withLanguage:withVoice:delegate:' in the file CDVSpeechKit.m, in this piece of code
|
I have a very basic knowledge about using xcode and I have changed the file SKSession.h adding the missing |
Yes, this won't work like that. The problem is that the session allows only either withLanguage or withVoice. I'll look into that. The most promising solution is to use options |
oh OK... thanks for your support |
@ptykamikaze could you please try on IOS, replace the following in CDVSpeechKit.m: - (void) startTTS:(CDVInvokedUrlCommand*)command{
NSLog(@"CDVSpeechKit.startTTS: Entered method.");
// If the voice is nil, use language default voice. If the voice is set, ignore language and use voices default lang.
if (command.arguments objectAtIndex:2 == nil) {
SKTransaction* transaction = [session speakString:[command.arguments objectAtIndex:0]
withLanguage:[command.arguments objectAtIndex:1]
delegate:self];
} else {
SKTransaction* transaction = [session speakString:[command.arguments objectAtIndex:0]
withVoice:[command.arguments objectAtIndex:2]
delegate:self];
}
NSLog(@"CDVSpeechKit.startTTS: Leaving method.");
} Note that this will either use selected language when voice parameter is null, or if voice is set it will ignore the language parameter, and use voices language instead! |
Error CDVSpeechKit.m:33:49: Expected ']'... I changed that line from |
Thanks a lot for your help! I thought that language and voice parameters were required |
Thanks for the response! I try to create the fix today! |
In the nuance's website you can select the language and the voice so I was trying to find something in the documentation that describe how can I select the voice (if it is possible)
The text was updated successfully, but these errors were encountered: