theevann/streamlit-audiorecorder

Pause/resume

djk1983 opened this issue · 7 comments

Hi,

Thank you for your work on this. I have added the component into a streamlit application that records audio and then transcribes it via OpenAI's Whisper, then improves the grammar and formatting via GPT-3.5-turbo. It works very well.

Would it be possible to add in a second button to pause/resume the recording?

Whilst I can dabble with python, I have no knowledge of JS/TS.

Hello !

Could you just clarify what the expected behavior is?
My first idea would be to add an second pause button:

  • When you click pause, we should stop the recording but it should trigger no action on the streamlit side.
  • When you click stop, the overall recording should be sent to streamlit in python for processing.

Is that what you had in mind ?

Hello,

Yes, that is exactly what I had in mind.

I am using my app to dictate file notes and emails. Being able to pause and think, then resume, would make it easier to record longer and more complex notes.

Many thanks

I pushed an update on PyPI, you should be able to specify a pause text and see a pause button appear if you upgrade.
Let me know if it works fine for you.

Thank you, much appreciated. I'm away this evening and will upgrade when I'm back tomorrow.

Hi,

I have upgraded and the code functions as expected, albeit that the buttons do not render correctly. There is no text displayed (even when all three prompts are set when instantiating the widget in streamlit) and they are very small.

I really appreciate your work on this.

I am using MS Edge on Ubuntu. Also tried on Firefox, and Safari on iOS with the same rendering glitch.

I have not been able to reproduce the error you mention on my machine.
The streamlit cloud app here also seems to work fine.
Maybe try uninstalling and reinstalling it ?

Thank you. I have it working properly in a local instance. Once packaged to a docker container the buttons fail to render correctly. I will continue to explore and see where I get to. Thank you for your help. Very much appreciated.