Azure-Samples / azure-search-openai-demo

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
https://azure.microsoft.com/products/search
MIT License
5.59k stars 3.75k forks source link

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

Closed john0isaac closed 3 weeks ago

john0isaac commented 4 weeks ago

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.

pamelafox commented 3 weeks ago

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 commented 3 weeks ago

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 commented 3 weeks ago

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