Skip to content

Suggestion: Expose "energy" to allow for volume monitoring #853

@followkim

Description

@followkim

Not an issue just a suggestions... please add "energy" as a public variable so that people can monitor it.

In my use case, I updated my local copy to expose "energy" and use it to show a volume meter as the speech is coming in.

            energy = audioop.rms(buffer, source.SAMPLE_WIDTH)  # energy of the audio signal
            self.current_energy = energy

then I pull sr.current_energy and set the volume indicator accordingly.

LOVE YOUR PRODUCT! Thank you very much!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions