-
Notifications
You must be signed in to change notification settings - Fork 5k
On Demand Azure Speech Generation #1894
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
On Demand Azure Speech Generation #1894
Conversation
TODO
|
@TaylorN15, can you look at this and let me know if it's working as you expect? @pamelafox done, it's not the prettiest implementation but it works. This is the initial implementation for on-demand speech request b4c1b21 but every time you click on it, it will make a new request to Azure Speech Service. |
This looks good, very quick, nice job :) Why is |
Also it seems you can play multiple concurrently, this doesn't happen with the web speech API as it seems to handle it automatically. I think it would be best to have some sort of state to manage if audio is playing on any answer, and pause/stop on others if another one is played. |
nope like I said on the issue the AzureSpeechOutput is a component that can't keep track of its state anything done inside it is not saved.
This is out of the scope of this PR, and it was never being handled correctly for Azure Speech Service.
|
c6dcd30
to
ff043d8
Compare
I have gotten this working in my implementation, but quite a few changes from what you have so it's hard to compare.
Then I pass the state of the audio loading/playing into the buttons so that it shows a play/stop depending on state. |
@TaylorN15 welp, I didn't want to do this I found a workaround. |
Looks good. I don't have time to deploy and test, like I said my code is quite different. |
4019b99
to
84147b3
Compare
prevent speech generation while streaming the response
84147b3
to
9c551f3
Compare
Hm I just had a bug where I got an answer, heard the speech, then cleared chat and asked anopther question, and it played the original speech. I'm trying to replicate it to figure out what leads to it. |
When you clear the chat all of the generated voice urls are set to null so, i'm not sure about that. |
I could not replicate this issue. |
Co-authored-by: Pamela Fox <[email protected]>
I haven't replicated the issue either. I think the new code architecture looks good. I just pushed a change which preloads the "sync" icon. That's because I was briefly seeing the no-image-indicator briefly before the sync icon came in, and I found that confusing. |
Thanks, merged! |
Purpose
fix #1892
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.
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.
Type of change
Code quality checklist
See CONTRIBUTING.md for more details.
python -m pytest
).python -m pytest --cov
to verify 100% coverage of added linespython -m mypy
to check for type errorsruff
andblack
manually on my code.