Skip to main content

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
  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact
  6. Acknowledgments

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.7 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

speechcapture-0.2.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

speechcapture-0.2.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file speechcapture-0.2.0.tar.gz.

File metadata

  • Download URL: speechcapture-0.2.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.5 Darwin/21.6.0

File hashes

Hashes for speechcapture-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e40d3ba130c3fa2ec3ef6b858def3d2165fd6764fe257d3c5401781f1b3409b9
MD5 a164b8184b76ee7e0bfd7900faed5955
BLAKE2b-256 48c6e45f0e74bccd752767ee680e8595e0dfbf2e99dee20b7de0c96f60185dea

See more details on using hashes here.

File details

Details for the file speechcapture-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: speechcapture-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 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

Hashes for speechcapture-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a67cb39702e1921251c434769fe93bdf3c1a8164564612f9d42ec9978bfe60a
MD5 61018e73b8e2cec79b460b69a741aa67
BLAKE2b-256 8eeda763dd1cd9a19fd4964fb94e4c01ad5c4ee12547d1f7c180c70555ee6c8c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page