I’m looking at how to do text to speach in Cocos2d-js. It’s easy enough using the platforms native calls. For example in IOS it would look something like this (Taken from stackoverflow)
AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc]init];
AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"Hey Guys"];
[synthesizer speakUtterance:utterance];
But I want to do this in a platform independent way. Is there a way to do this? Even if it requires native extensions that’s fine. But how would I go about that?
Thanks
Dave