Coder Social home page Coder Social logo

Comments (3)

anurag-desp avatar anurag-desp commented on August 29, 2024 2

That's the thing buddy, no such file is being created. The audio_recorder function simply "records"(not sure how its done) the audio for the given sample rate, start and end thresholds etc. and converts this recording into a stream of bytes. This stream of bytes is then directly sent to audio function of streamlit. To store this audio in a separate audio file, you can simply write these bytes to a .wav file.

# A simple sample code. NOT sure about the security though :(

from audio_recorder_streamlit import audio_recorder
import streamlit as st

audio_bytes = audio_recorder()
if audio_bytes:
    with open ("temp_audio_file.wav", mode="wb") as recorded_data:
        recorded_data.write(audio_bytes)

    st.audio(audio_bytes, format="audio/wav")

from audio-recorder-streamlit.

j-j-kam avatar j-j-kam commented on August 29, 2024

Please share how did you resolve the issue? I cannot seem to understand where the audio file is stored when I replay it in the browser. It certainly is not saved to my Python directory. Is it stored in the cache? The must be a way to store is securely somewhere, e.g. what if the audio has confidential data? I want to record and save it locally or in a database. Is it possible?

from audio-recorder-streamlit.

lunar-studio avatar lunar-studio commented on August 29, 2024

Is there any way to have a text input to define the name of the saved .wav file?

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.