Name | st-audio-recorder JSON |
Version |
0.0.2
JSON |
| download |
home_page | |
Summary | |
upload_time | 2023-09-10 12:29:21 |
maintainer | |
docs_url | None |
author | Stefan Rummer |
requires_python | >=3.10,<4.0 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# streamlit_audio_recorder (Custom Component)
Implemented by [Stefan Rummer](https://www.linkedin.com/in/stefanrmmr/) - (work in progress)<br/>
Based on [doppelgunner](https://github.com/doppelgunner/audio-react-recorder)'s [Audio-React-Recorder](https://www.npmjs.com/package/audio-react-recorder)<br/>
<br/>
## Features & Outlook
- Managing access to your microphone via the browser's Media-API
- Record, playback and revert audio-captures within the streamlit app
- Download the final recording to your local system (WAV, 16 bit, 44.1 kHz)
- Directly return audio recording-data to Python backend! (arrayBuffer)<br><br>
- **NEW:** Reduced repo size by removal of redundant node-modules! (393Mb --> 70Mb)
- **NEW:** Simplified SETUP TUTORIAL, that will get you to record audio within no time!
## Component Setup - step by step
**1.** Import and install relevant libraries to your Python project.
```
import os
import numpy as np
import streamlit as st
from io import BytesIO
import streamlit.components.v1 as components
```
**2.** Add the folder `/st_audiorec` to the top level directory of your project.<br><br>
**3.** Add the file `st_custom_components.py` to your project wherever you like.<br><br>
**4.** Import the function `st_audiorec()` to your main streamlit application code.
```
from st_custom_components import st_audiorec
```
**5.** Add an instance of the audio recorder component to your streamlit app's code.
```
wav_audio_data = st_audiorec()
if wav_audio_data is not None:
# display audio data as received on the backend
st.audio(wav_audio_data, format='audio/wav')
# INFO: by calling the function an instance of the audio recorder is created
# INFO: once a recording is completed, audio data will be saved to wav_audio_data
```
**6. Enjoy recording audio inside your streamlit app! 🎈**
Feel free to reach out to me in case you have any questions! <br>
Pls consider leaving a `star` ☆ with this repository to show your support.
Raw data
{
"_id": null,
"home_page": "",
"name": "st-audio-recorder",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Stefan Rummer",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/2d/4c/41406627728207508ba36e30c5cae33a8953b176662c70e7f482a3874962/st_audio_recorder-0.0.2.tar.gz",
"platform": null,
"description": "# streamlit_audio_recorder (Custom Component)\n\nImplemented by [Stefan Rummer](https://www.linkedin.com/in/stefanrmmr/) - (work in progress)<br/>\nBased on [doppelgunner](https://github.com/doppelgunner/audio-react-recorder)'s [Audio-React-Recorder](https://www.npmjs.com/package/audio-react-recorder)<br/>\n\n<br/>\n\n## Features & Outlook\n- Managing access to your microphone via the browser's Media-API\n- Record, playback and revert audio-captures within the streamlit app\n- Download the final recording to your local system (WAV, 16 bit, 44.1 kHz)\n- Directly return audio recording-data to Python backend! (arrayBuffer)<br><br>\n- **NEW:** Reduced repo size by removal of redundant node-modules! (393Mb --> 70Mb)\n- **NEW:** Simplified SETUP TUTORIAL, that will get you to record audio within no time!\n\n\n## Component Setup - step by step\n**1.** Import and install relevant libraries to your Python project. \n```\nimport os\nimport numpy as np\nimport streamlit as st\nfrom io import BytesIO\nimport streamlit.components.v1 as components\n```\n**2.** Add the folder `/st_audiorec` to the top level directory of your project.<br><br>\n**3.** Add the file `st_custom_components.py` to your project wherever you like.<br><br>\n**4.** Import the function `st_audiorec()` to your main streamlit application code.\n```\nfrom st_custom_components import st_audiorec\n```\n**5.** Add an instance of the audio recorder component to your streamlit app's code.\n```\nwav_audio_data = st_audiorec()\n\nif wav_audio_data is not None:\n # display audio data as received on the backend\n st.audio(wav_audio_data, format='audio/wav')\n \n# INFO: by calling the function an instance of the audio recorder is created\n# INFO: once a recording is completed, audio data will be saved to wav_audio_data\n```\n**6. Enjoy recording audio inside your streamlit app! \ud83c\udf88**\n\nFeel free to reach out to me in case you have any questions! <br>\nPls consider leaving a `star` \u2606 with this repository to show your support.\n",
"bugtrack_url": null,
"license": "",
"summary": "",
"version": "0.0.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b85363140998f57c0a2c59f09c913272d42c24c2456956b1cf4db5ad78ee99cb",
"md5": "84eeabeb2a5eac3471e04bf6ad33d5d1",
"sha256": "9ecf6432f09d1abe4ea7132bda25c9f947d39b152ae250aaabbfb70925e67f31"
},
"downloads": -1,
"filename": "st_audio_recorder-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "84eeabeb2a5eac3471e04bf6ad33d5d1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 878359,
"upload_time": "2023-09-10T12:29:18",
"upload_time_iso_8601": "2023-09-10T12:29:18.132611Z",
"url": "https://files.pythonhosted.org/packages/b8/53/63140998f57c0a2c59f09c913272d42c24c2456956b1cf4db5ad78ee99cb/st_audio_recorder-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2d4c41406627728207508ba36e30c5cae33a8953b176662c70e7f482a3874962",
"md5": "81198b1b2fcfe061e40f9559b45ce19e",
"sha256": "4483e421fc0bd4ccd092a505e2d233c829d13b1de93c218da6555221024ff7af"
},
"downloads": -1,
"filename": "st_audio_recorder-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "81198b1b2fcfe061e40f9559b45ce19e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 862880,
"upload_time": "2023-09-10T12:29:21",
"upload_time_iso_8601": "2023-09-10T12:29:21.527673Z",
"url": "https://files.pythonhosted.org/packages/2d/4c/41406627728207508ba36e30c5cae33a8953b176662c70e7f482a3874962/st_audio_recorder-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-10 12:29:21",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "st-audio-recorder"
}