An easy to use library for recording and saving speech audio
Project description
SpeechCapture
An easy to use library for recording and saving speech audio
Table of Contents
About the Project
SpeechCapture is a Python library made to simplify the complex process of recording and saving your voice automatically from Python code.
Features
- Automatic stop on silence
- Customizable silence threshold
- Dynamically adjust threshold based on surrounding noise
- Pausing and resuming recording
- Saving audio as .WAV at any time
- Recording in background threads
- Simultaneous recordings
- Stopping at any time
Getting Started
Prerequisites
To use SpeechCapture, you will need the following installed:
- Python 3.8 or higher
Installation
To install, simply run in your terminal:
$ pip install speechcapture
Once you have installed the package, do not forget to import:
import speechcapture
You can now start using SpeechCapture (example usage below)
PyAudio
If installation of PyAudio, a required dependancy, fails, try running the following commands:
MacOS
$ brew install portaudio
$ pip install pyaudio
Ubuntu/Linux
$ sudo apt install portaudio19-dev
$ pip install pyaudio
Usage
import speechcapture as sc
file_path = 'output.wav'
r = sc.Recorder(file_path)
r.adjust_for_ambient_noise()
r.max_seconds_of_silence = 3
r.record()
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Bilal Darwish - darwish.b.bilal@gmail.com
Source Code and Issues: https://github.com/bdarwish/speechcapture/
Acknowledgments
Dependencies:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file speechcapture-0.5.0.tar.gz.
File metadata
- Download URL: speechcapture-0.5.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.13.5 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4e23a2479d74ec3b49b79729676e03c0d29ca1727259399ea11ff815406ee75
|
|
| MD5 |
d65429f59864e5f3e5cf377dc2fc5ac0
|
|
| BLAKE2b-256 |
ba5bdb9bd756b6c4885bb07c802a667cb369abb6cbb977cc1968539022f332cc
|
File details
Details for the file speechcapture-0.5.0-py3-none-any.whl.
File metadata
- Download URL: speechcapture-0.5.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.13.5 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88aa52e0cf54be96be913bc58185b3e1d0516f12f509927c2f7aca578a9e8ca5
|
|
| MD5 |
64ff5efe07a7461894b5aec03714d9e6
|
|
| BLAKE2b-256 |
b873f38c22240cd2541900445b1e4b68cd759da9515ae8912135ec79289fd4e8
|