Skip to main content

A lightweight speech transcription tool using OpenAI's Whisper

Project description

TinyTranscriber: A Lightweight Speech Transcription Tool

A simple, extensible Python tool that records audio from your microphone and transcribes it using OpenAI's Whisper API.

Features

  • Record audio from your microphone
  • Save recordings as WAV files
  • Transcribe audio to text using OpenAI's Whisper

Prerequisites

  • OpenAI API key

Installation

Install via pip:

pip install tiny-transcriber

Or install from source:

git clone https://github.com/brendanm12345/tiny-transcriber
cd tiny-transcriber
pip install -e .

Set your OpenAI API key:

export OPENAI_API_KEY='your-api-key'

Quick Start

from tiny_transcriber import TinyTranscriber

transcriber = TinyTranscriber()

# Start recording
transcriber.start_recording()

# Record for as long as needed
input("Press Enter to stop recording...")

# Stop and save recording
audio_file = transcriber.stop_recording("my_recording.wav")

# Transcribe the audio
transcript = transcriber.transcribe(audio_file)
print(transcript)

How It Works

The project uses several key Python libraries:

  • pyaudio: Handles audio input from the microphone
  • wave: Saves audio data in WAV format
  • openai: Interfaces with OpenAI's Whisper API for transcription
  • threading: Manages continuous audio recording

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

tiny_transcriber-0.1.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

tiny_transcriber-0.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file tiny_transcriber-0.1.0.tar.gz.

File metadata

  • Download URL: tiny_transcriber-0.1.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for tiny_transcriber-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a22adffa0323a0c772132e3e396be2923f4c1959eacd7f086401135404afe6c4
MD5 d1c1a3d0ca7d881458233fa68e48dafd
BLAKE2b-256 83ea44e61d357a7dd07bfa7a93cbf9b5e658ed99510d538de11ae56f180d5abb

See more details on using hashes here.

File details

Details for the file tiny_transcriber-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tiny_transcriber-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 473d68c0536218473082b8598b99120aea97dffd71fee31bd16f47540e08bd7f
MD5 449d0fc2dffc212302c0c6c8c2fb5767
BLAKE2b-256 157046505462951817b697d0886775b42df458e34889e223e9099333c2e898a0

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