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

How to pause recording #6

Open
loudly-soft opened this issue Jan 1, 2024 · 2 comments
Open

How to pause recording #6

loudly-soft opened this issue Jan 1, 2024 · 2 comments

Comments

@loudly-soft
Copy link

The integration with Whisper works well. Awesome. I'm a noob to Streamlit, so I'm still trying to figure out how to style the recording button to match the color of my primary buttons.

Also, just a thought, maybe a pause recording feature would be useful to have to give a person time to think what to say between sentences.

@B4PT0R
Copy link
Owner

B4PT0R commented Jan 1, 2024

Hello,

Thanks for the nice comment :)

Regarding styling : I did my best to auto-style the button as closely as possible to streamlit built-in buttons. The button styling should adapt to the theme of your app to some extent, but may not match exactly the native button style for some theme choices. Reproducing a styling logic that would match the native button style for all themes is not that trivial. Knowing in details how streamlit handles buttons styling could help a great deal, but I didn't find the precise information (some colors used to theme streamlit's buttons are not exactly colors passed in the theme object, but look like a linear combination of them).

Regarding the pausing feature : I don't think I will implement it as it would complicate the widget uselessly (would require to deal with three possible states: recording, finished, and paused, requiring more than a simple button as interface). If you have a good idea how to do it with a clean and simple interface, why not !

Happy new year!

Cheers,

Baptiste

@loudly-soft
Copy link
Author

Happy new year to you, too.

I see. The current button styling still looks good on my app. It's actually good that the recording button looks a bit different from the other form buttons.

I've got the pause idea from this audio recording component. It's beyond me how it was done.

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

No branches or pull requests

2 participants