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

feat: add low cost browser text to speech output using WebSpeechAPI #1671

Merged
merged 8 commits into from
Jun 3, 2024

Conversation

john0isaac
Copy link
Contributor

@john0isaac john0isaac commented May 31, 2024

Purpose

This PR adds the optional feature to enable the built into browsers text to speech optional feature by setting the USE_SPEECH_OUTPUT_BROWSER boolean.

Does this introduce a breaking change?

When developers merge from main and run the server, azd up, or azd deploy, will this produce an error?
If you're not sure, try it out on an old environment.

[ ] Yes
[x] No

Does this require changes to learn.microsoft.com docs?

This repository is referenced by this tutorial
which includes deployment, settings and usage instructions. If text or screenshot need to change in the tutorial,
check the box below and notify the tutorial author. A Microsoft employee can do this for you if you're an external contributor.

[ ] Yes
[x] No

Type of change

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

Code quality checklist

See CONTRIBUTING.md for more details.

  • The current tests all pass (python -m pytest).
  • [-] I added tests that prove my fix is effective or that my feature works
  • [-] I ran python -m pytest --cov to verify 100% coverage of added lines
  • [-] I ran python -m mypy to check for type errors
  • I either used the pre-commit hooks or ran ruff and black manually on my code.

This PR adds the optional feature to enable the built into browsers text to speech optional feature by setting the  boolean.
@john0isaac john0isaac marked this pull request as ready for review June 1, 2024 21:11
@pamelafox
Copy link
Collaborator

Thank you! Code looks good from a first glance, I'll check out the branch myself locally and see if I notice anything while using it.

@john0isaac
Copy link
Contributor Author

john0isaac commented Jun 2, 2024

I tried to make the naming match your AzureSpeechOutput in case you want to merge it in one file and do the checks there.
IMHO, the way it is now is cleaner and easy to customize as the features doesn't overlap.

@john0isaac
Copy link
Contributor Author

john0isaac commented Jun 3, 2024

Weird, I did run pre-commit run --all-files.
I did fix the ruff things, it should be good now.

Copy link
Collaborator

@pamelafox pamelafox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great code change! Everything works well, looks good, and is cleanly implemented. I tried it out locally and deployed (https://app-backend-ixehwdxj5j4oe.azurewebsites.net/), all seems well.

@pamelafox pamelafox merged commit 306ac38 into Azure-Samples:main Jun 3, 2024
15 checks passed
@john0isaac john0isaac deleted the add-low-cost-speech branch June 3, 2024 22:08
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