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

language option does not work since it is not passed to Swift/Java codes #3

Open
jammind opened this issue Aug 5, 2021 · 0 comments

Comments

@jammind
Copy link

jammind commented Aug 5, 2021

I found the language property is not passed to the native codes. I fixed it with the following changes.

Speech.js

    let language = options && options.language ? options.language : 'en-US' // Line 45
    exec(success, error, SPEECH, API_LIST.SPEAK_OUT, [message, pitchRate, speechRate, language]) // Line 46

Speech.swift

        var language = command.arguments[3] as? String ?? "en-US"  // Line 92
        speechUtterance.voice = AVSpeechSynthesisVoice(language: language) / Line 99

Speech.java

                Speech.this.speak(message, pitchRate, speechRate, language);  // Line 179
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

No branches or pull requests

1 participant