
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
audio-recorder-streamlit
Advanced tools
This streamlit component allows to register an audio utterence from a user.
pip install audio-recorder-streamlit
import streamlit as st
from audio_recorder_streamlit import audio_recorder
audio_bytes = audio_recorder()
if audio_bytes:
st.audio(audio_bytes, format="audio/wav")
You can adjust the recording parameters energy_threshold
and
pause_threshold
:
energy_threshold
: The energy recording sensibility above which we consider
that the user is speaking. If it is a float, then this is the energy
threshold used to automatically detect recording start and recording end.
You can provide a tuple for specifying different threshold for recording
start detection and recording end detection.pause_threshold
: The number of seconds to spend below energy_level
to
automatically stop the recording.sample_rate
: Sample rate of the recorded audio. If not provided, this will use the
default sample rate (https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/AudioContext).auto_start
: If True
starts the recording as soon as the component has loaded.# The recording will stop automatically
# 2 sec after the utterance end
audio_bytes = audio_recorder(pause_threshold=2.0, sample_rate=41_000)
You can adjust the button style parameters:
audio_bytes = audio_recorder(
text="",
recording_color="#e8b62c",
neutral_color="#6aa36f",
icon_name="user",
icon_size="6x",
)
You can record for a fixed duration by setting the energy_threshold=(-1.0, 1.0)
so that the recorder considers that you are speaking at the beginning and then
you are never speaking from this point on.
Then simply set pause_threshold
to your desired recording length.
# Records 3 seconds in any case
audio_bytes = audio_recorder(
energy_threshold=(-1.0, 1.0),
pause_threshold=3.0,
)
FAQs
Unknown package
We found that audio-recorder-streamlit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.