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

Feature suggestion - ability to redirect TTS audio output into earpiece or speaker #14

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

binarybase
Copy link

speak() method: added boolean option "earpiece" to start reading directly into phone's earpiece
setSpeaker() method: switch audio routing into speaker even when reading is already started
setEarpiece() method: switch audio route into earpiece

tested only on IOS 15.3, android methods implemented but not tested yet, but should be working

source code used from cordova-plugin-audiotoggle plugin

new methods
- setSpeaker()
- setEarpiece()

options:
- added boolean earpiece - when true audio output is automatically redirected into earpiece
* android needs to have audio change permission
* TTS need to have specified bundle with STREAM_VOICE_CALL mode
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