Coder Social home page Coder Social logo

Comments (4)

Joooohan avatar Joooohan commented on August 29, 2024

Hi @gustavz, happy to see you are seeing some value in this component.

There are 3 parameters not exposed to the Python API that control when to start recording automatically and when to stop recording.

They are here: for every buffer we compute the audio energy level. If the energy level stays above the energy_threshold more than phrase_threshold then the recording starts. After that, if the energy level stays below energy_threshold longer than pause_threshold the recording automatically stops.

This fits the classic use case of starting the recording, speaking a phrase and automatically stopping when the phrase is over.

I can expose these parameters in the Python component to have more control on how to record.

from audio-recorder-streamlit.

gustavz avatar gustavz commented on August 29, 2024

Makes sense, thank you for the quick reply. And yeah it would be great if you could expose these parameters.
Any configurability of the component would be highly appreciated (like button appearance and such things).
An option to switch between auto recording like it is the default right now and an manual start stop would also be great!

from audio-recorder-streamlit.

Joooohan avatar Joooohan commented on August 29, 2024

I exposed the energy_threshold and pause_threshold in version 0.0.5. To have the manual start and stop behavior you can set the energy threshold to 0 so that the the recording never stops automatically. The recording can be manually stopped by clicking again on the button.

I will also add the possibility to change the appearance.

from audio-recorder-streamlit.

Joooohan avatar Joooohan commented on August 29, 2024

@gustavz I added the ability to customize the icon, colors and size in version 0.0.6.

from audio-recorder-streamlit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.