Skip to main content

A radio streaming and transcription application.

Project description

# README for audio_miner

## audio_miner

audio_miner is a Python application that records audio streams and transcribes them using the Whisper model. It allows users to capture radio broadcasts and convert them into text files for easy access and analysis.

### Features

  • Record audio streams in specified segments.

  • Transcribe recorded audio using the Whisper model.

  • Organize recordings and transcriptions in a structured directory.

### Installation

To install audio_miner, you can use pip. Clone the repository and run the following command:

`bash pip install . `

Additionally, you need to have ffmpeg installed on your system. You can install it using the following command:

`bash sudo apt-get install ffmpeg `

### Usage

After installation, you can run audio_miner from the command line. Use the following command format:

`bash audio_miner --stream-url <STREAM_URL> --sender <SENDER_NAME> [--segment-time <SEGMENT_TIME>] [--base-dir <BASE_DIR>] [--poll-interval <POLL_INTERVAL>] [--whisper-model <WHISPER_MODEL>] [--quality <QUALITY>] [--record-only] [--transcribe-only] [--verbose] [--ffmpeg-path <FFMPEG_PATH>] `

#### Parameters

  • –stream-url: The URL of the audio stream to record (required).

  • –sender: The name of the radio station (required).

  • –segment-time: Length of each audio segment in seconds (default: 3600).

  • –base-dir: Base directory for storing audio and transcription files (default: current directory).

  • –poll-interval: Interval in seconds between recordings (default: 5).

  • –whisper-model: The Whisper model to use for transcription (default: TURBO; options include TINY, BASE, SMALL, MEDIUM, LARGE, TURBO).

  • –quality: Audio bitrate for re-encoding (default: 64k).

  • –start-time: Start time for transcription in YYYYMMDD_HHMMSS format. Only relevant when using –transcribe-only.

  • –end-time: End time for transcription in YYYYMMDD_HHMMSS format. Only relevant when using –transcribe-only.

  • –record-only: Record audio without transcribing.

  • –transcribe-only: Transcribe existing audio files without recording.

  • –verbose: Enable detailed output.

  • –ffmpeg-path: Path to the ffmpeg executable. This is only necessary if ffmpeg cannot be started directly from the terminal.

### Example

To record from a stream and transcribe it, you can use:

`bash audio_miner --stream-url 'https://liveradio.swr.de/sw282p3/swr1rp/' --sender 'swr1' --segment-time 3600 --base-dir './output' --poll-interval 5 --whisper-model TURBO --quality '64k' `

### Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any suggestions or improvements.

### License

This project is licensed under the MIT License. See the LICENSE file for more details.

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

audio_miner-0.0.2.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

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

audio_miner-0.0.2-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file audio_miner-0.0.2.tar.gz.

File metadata

  • Download URL: audio_miner-0.0.2.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for audio_miner-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0f8b185a9d9ac6a15ac2e802a68ec5e317de781625179fbd9fc405c40b61d6d0
MD5 35311c81d04e5bedbde024bfffda6799
BLAKE2b-256 6fa71984bea0a7da65f8a30544c458b161c39c138e347522f31fd74c1bf60065

See more details on using hashes here.

File details

Details for the file audio_miner-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: audio_miner-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for audio_miner-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d1d3bde5a3f6861ef54c8dce023c2fb223958ece8d45656958d319503b6dce1a
MD5 7da0845b183767ee723c223c30018b05
BLAKE2b-256 8cc8268dc1c90b170528c3727373cc3c04b3ad9e233b57b1f0f8786a0efde73a

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