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

text to speech via capacitor plugin #28

Merged
merged 3 commits into from
Jul 2, 2024

Conversation

sebastianovide
Copy link
Contributor

for #24

Before building a native app, we need to migrate some functionality from the webview to Capacitor. This allows Capacitor to choose the appropriate technology based on the device.

In this pull request, I've replaced the web-based speechSynthesis API with a Capacitor text-to-speech plugin. I've tested the functionality in Chrome (Linux and Android) and the Android app.

Testing on iPhone is still required.

@steinbro
Copy link
Member

The voice dropdown is appropriately populated, but did you test that the voice selection takes effect? At least with Firefox on Windows, the voice is not changing

@sebastianovide
Copy link
Contributor Author

ooo.... ok.... will need to check that....

@steinbro
Copy link
Member

steinbro commented Jul 2, 2024

The voice changes now, but I'm getting the strange behavior that the first voice in the list doesn't match the description. On Firefox on Windows, the first selection is Microsoft David, but the voice is actually Microsoft Zira. Picking any other voice on the list (including Zira) sounds as expected, but switching back to David returns the voice to Zira.

@sebastianovide
Copy link
Contributor Author

The voice changes now, but I'm getting the strange behavior that the first voice in the list doesn't match the description. On Firefox on Windows, the first selection is Microsoft David, but the voice is actually Microsoft Zira. Picking any other voice on the list (including Zira) sounds as expected, but switching back to David returns the voice to Zira.

that's odd... I've added a line to set the initial voice... it seems to work on Linux (Chrome and Firefox)... I'll need to check on Windows...

@steinbro
Copy link
Member

steinbro commented Jul 2, 2024

Hmm, I'm going to chalk up that behavior to a weird configuration on my machine; there are a few voices that show up in some voice lists but don't actually work.

@steinbro steinbro merged commit 750aa3b into soundscape-community:main Jul 2, 2024
2 checks passed
@steinbro
Copy link
Member

steinbro commented Jul 3, 2024

FYI, I had to refactor this a bit (05f3c08) to keep the activity simulator working (that view doesn't have a voice selector, and you put the TTS initialization in the voice selector setup). As you continue with these, make sure you test both index.html and replay_gpx.html.

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.

2 participants