speech-analyser
Transcribes audio and video files and returns speech metrics: word count, speaking rate, filler word detection, silence ratio, and a quality score with natural-language insights. Optionally identifies individual speakers.
Part of the analyser family.
Install
pip install speech-analyser
Requires Python 3.11+. Uses CPU by default; GPU (CUDA) is used automatically if available.
For speaker diarization, install the extra and set a Hugging Face token:
pip install "speech-analyser[diarization]"
export HF_TOKEN=hf_...
Usage
Python
from speech_analyser import SpeechAnalyser
lens = SpeechAnalyser() # model_size="base" by default
result = lens.analyse("recording.mp3")
m = result["speech_metrics"]
print(f"Duration: {result['duration']:.1f}s")
print(f"Words: {m['word_count']} ({m['speaking_rate_wpm']} wpm, {m['pace_category']})")
print(f"Quality: {m['quality_score']}/100")
print(result["transcript"])
CLI
# Human-readable summary
speech-analyser analyse recording.mp3
# Larger model for better accuracy
speech-analyser analyse lecture.wav --model small
# Machine-readable JSON
speech-analyser analyse recording.m4a --json
# Speaker diarization
speech-analyser analyse interview.mp3 --diarize
# Start the HTTP server
speech-analyser serve --port 8001
HTTP API
curl -X POST http://localhost:8001/analyse \
-F "file=@recording.mp3"
Supported formats
Audio: .mp3 .wav .m4a .ogg .flac .aac .wma .opus
Video: .mp4 .mov .avi .mkv .webm — audio track is extracted automatically.
Model sizes
| Model | Speed | Accuracy |
|---|---|---|
tiny |
fastest | lowest |
base |
fast | good (default) |
small |
medium | better |
medium |
slow | very good |
large-v3 |
slowest | best |
Models download on first use (~75 MB for base, ~1.5 GB for large-v3).
Output
{
"transcript": "Good morning everyone...",
"language": "en",
"duration": 62.4,
"segments": [{"start": 0.0, "end": 3.2, "text": "Good morning everyone", "speaker": null}],
"speech_metrics": {
"word_count": 120,
"speaking_rate_wpm": 115.4,
"pace_category": "natural",
"filler_word_count": 3,
"filler_word_rate": 0.025,
"filler_words_found": ["um", "basically"],
"silence_ratio": 0.18,
"actual_speaking_time": 51.2,
"quality_score": 78,
"quality_factors": {"clarity": 23, "depth": 18, "balance": 18, "pace": 19},
"quality_ratings": {"clarity": "excellent", "depth": "good", "balance": "good", "pace": "good"},
"insights": {
"strengths": ["Very few filler words — speech is clear"],
"observations": ["Speaking rate is slightly slow — aim for 130–170 wpm"]
}
},
"diarization_available": false,
"speakers": null,
"talk_time": null,
"file_path": "/path/to/recording.mp3",
"file_size": 2048000
}
When diarization is enabled, speakers contains per-speaker word count, duration, and percentage; talk_time.is_balanced flags whether one speaker dominates.
The analyser family
Low-level analysis tools. Each accepts files directly and returns structured JSON. Build your own UI or pipeline on top.
| Package | Handles |
|---|---|
| speech-analyser | audio and video files — transcript and speech metrics |
| video-analyser | video files — frames, scenes, and visual quality |
| document-analyser | PDF, DOCX, PPTX, TXT — text and readability |
| code-analyser | source code — style, complexity, and quality metrics |
| records-analyser | CSV, Excel, SQLite, Parquet, JSON — data profiling |
| auto-analyser | any file — detects format and routes to the right tool |
Licence
MIT
Metadata
Release files for speech-analyser 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| speech_analyser-0.7.0.tar.gz | 266.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| speech_analyser-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 285.6 kB
Release files / speech_analyser-0.7.0.tar.gz
| Download URL | speech_analyser-0.7.0.tar.gz |
|---|---|
| Size | 266.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c5ce2e8b1eb16e8cdb93439b9cf0ca472081f7f262a4b0e8fc573c29d40899b
|
|
BLAKE2b-256 checksum How to use checksums |
275c25cbed7b81f506aab5fd9bcb628eb56925b0841109e029f7e22c974e254d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|
Release files / speech_analyser-0.7.0-py3-none-any.whl
| Download URL | speech_analyser-0.7.0-py3-none-any.whl |
|---|---|
| Size | 18.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c73c67d15a4453416d939e22e3da0d46e9c44db848f9e348b91fdb608262e09d
|
|
BLAKE2b-256 checksum How to use checksums |
cc0d43f5ad80fa61ea92150a48f7070102f984b021e60dd578244e9364c96198
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.0
|