Skip to main content

FastSTT

FastSTT is a lightweight, hybrid Speech-to-Text Python library with real-time microphone and audio file transcription. Ideal for virtual assistants, chatbots, and low-latency voice input applications.

Features

  • Offline transcription with low latency
  • Real-time microphone transcription
  • Audio file transcription (WAV, MP3, M4A, etc.)
  • Optional timestamps for segments
  • Automatic or forced language detection
  • Lightweight and easy to use
  • Compatible with Python 3.10+

Installation

You can install FastSTT using pip:

pip install faststt

Note: Microphone support requires PyAudio installed. On some systems, you may need system dependencies:

Ubuntu/Debian:

sudo apt-get install portaudio19-dev

Windows: Use the prebuilt PyAudio wheel for your Python version.

Usage

1. Transcribe from microphone

from faststt import FastSTT
import logging

logging.basicConfig(level=logging.INFO)

stt = FastSTT(model_size="base", device="cpu")

print("Speak something...")
text = stt.listen_and_transcribe(timeout=5, phrase_time_limit=10)

print("Transcription:", text)

2. Transcribe from microphone in real-time

from faststt import FastSTT
import logging

logging.basicConfig(level=logging.INFO)

stt = FastSTT(model_size="base", device="cpu")

print("Listening continuously. Press Ctrl+C to stop.\n")

try:
    while True:
        text = stt.listen_and_transcribe(timeout=3, phrase_time_limit=5)
        if text and isinstance(text, dict):
            print("Transcription:", text["text"])
        else:
            print("...no speech detected.")
except KeyboardInterrupt:
    print("\nStopped by user.")

3. Transcribe from audio file

from faststt import FastSTT

stt = FastSTT(model_size="base", device="cpu", compute_type="int8")

file_path = "audio_file.wav"
result = stt.listen_from_file(file_path, with_timestamps=True)

if result:
    print("Transcription with timestamps:")
    for seg in result:
        print(f"[{seg['start']:.2f}s - {seg['end']:.2f}s]: {seg['text']}")
else:
    print("Transcription failed.")

License

This project is licensed under the MIT License.

Metadata

Release files for faststt 0.1.1

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

Source distribution (sdist)

Source distribution for faststt 0.1.1
File Size Uploaded
faststt-0.1.1.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for faststt 0.1.1
File Interpreter ABI Platform
faststt-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.4 kB

Release files / faststt-0.1.1.tar.gz

Download URL faststt-0.1.1.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
df1dca0b2001757444e31bee74d2b58ba6837e5094a09a46c6d1a38baeb7ea11
BLAKE2b-256 checksum
How to use checksums
1973274fda74ccb023ab3d96be49cddb111cc83752163ac5a0a905e216ad246e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.18

Release files / faststt-0.1.1-py3-none-any.whl

Download URL faststt-0.1.1-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72cca4ce632b5321e48e472de225b256e67caaca61c72db1a7fc28daf7b0895f
BLAKE2b-256 checksum
How to use checksums
f91bcc2a44d050462ea1c2db2eb3599f9c47e2d3638dd65c042e4c6aae438b2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.18

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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