Skip to main content

Fast Whisper Diarizer

Fast Whisper Diarizer is a Python package for audio transcription and speaker diarization using the Whisper model and NeMo toolkit.

Installation

To install the package, run:

pip install fast-whisper-diarizer

Initialization

Before using the diarize_audio function, you need to initialize the models using the initialize_models function. This ensures that the necessary models are loaded and ready for processing.

Example:

from fast_whisper_diarizer import initialize_models

whisper_model_name = "tiny.en"

# Initialize models
initialize_models(whisper_model_name)

Usage

To use the diarize_audio function, you can follow the example below. This function allows you to process audio data for transcription and speaker diarization, accepting both file paths and in-memory bytes data as input.

Example

from fast_whisper_diarizer import diarize_audio

# Example usage with a file path
final_transcript = diarize_audio(
    audio_data="path/to/audio/file.wav",
    whisper_model_name="tiny.en"
)
print(final_transcript)

# Example usage with in-memory bytes data
with open("path/to/audio/file.wav", "rb") as f:
    audio_bytes = f.read()

final_transcript = diarize_audio(
    audio_data=audio_bytes,
    whisper_model_name="tiny.en"
)
print(final_transcript)

Parameters

  • audio_data (str or bytes): The input audio, either as a file path (str) or in-memory bytes data (bytes).
  • whisper_model_name (str): The name of the Whisper model to use for transcription.

Optional Parameters

Parameter Type Default Description
separate_vocals bool True Whether to separate vocals from the audio.
processing_batch_size int 8 Batch size for processing audio.
language_code str None Language code for transcription.
suppress_numeric_tokens bool True Whether to suppress numeric tokens in transcription.
computation_device str 'cpu' Device to use for computation ('cpu' or 'cuda').

Metadata

Release files for fast-whisper-diarizer 0.1.32

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fast-whisper-diarizer 0.1.32
File Size Uploaded Provenance Actions
fast_whisper_diarizer-0.1.32.tar.gz 25.5 kB Without provenance Details for fast_whisper_diarizer-0.1.32.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fast-whisper-diarizer 0.1.32
File Interpreter ABI Platform Actions
fast_whisper_diarizer-0.1.32-py3-none-any.whl Python 3 none any Details for fast_whisper_diarizer-0.1.32-py3-none-any.whl

Total release size: 52.2 kB

Release files / fast_whisper_diarizer-0.1.32.tar.gz

Download URL fast_whisper_diarizer-0.1.32.tar.gz
Size 25.5 kB
Tags Source
SHA-256 checksum
How to use checksums
42a745cae4980ebdd062fd194e986a71dca291e6a1fbf50d366cb0104cf59f4d
BLAKE2b-256 checksum
How to use checksums
6e2e3f3150010d69fad607472478c7c5ac1edb0e60f7ebbde353efbf84abfbd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.15

Release files / fast_whisper_diarizer-0.1.32-py3-none-any.whl

Download URL fast_whisper_diarizer-0.1.32-py3-none-any.whl
Size 26.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f86d12d2dc85f1088b36e8b0e087f862e6defde1d6b9296f05c6617c51a52e52
BLAKE2b-256 checksum
How to use checksums
a9a9e95a5f7eb424dd73d2e046f5df6a17f6685242f5a254454e22ede6b460ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.15

Security for fast-whisper-diarizer 0.1.32

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.32 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page