NAME
Langertha::Engine::Whisper - Whisper compatible transcription server
VERSION
version 0.504
SYNOPSIS
use Langertha::Engine::Whisper;
my $whisper = Langertha::Engine::Whisper->new(
url => 'http://localhost:8000/v1',
api_key => $ENV{WHISPER_API_KEY}, # if the server checks one
transcription_model => 'Systran/faster-whisper-small',
);
print $whisper->simple_transcription('recording.ogg');
DESCRIPTION
Provides access to a self-hosted Whisper-compatible transcription server. Extends Langertha::Engine::TranscriptionBase and transcribes through the server's /audio/transcriptions endpoint.
url is required. The API key defaults to 'whisper' and is sent as Authorization: Bearer .... The transcription model defaults to an empty string, and then no model field is sent, for servers that pick their own default.
speaches (formerly faster-whisper-server) is a compatible server. Its answers differ from OpenAI's in these points (seen on speaches 0.8.3, 2026-10):
modelis required: withouttranscription_modelthe request fails with422and"loc":["body","model"],"msg":"Field required". Name a model the server has installed;GET /v1/modelslists them (Hugging Face IDs such asSystran/faster-whisper-small), an unknown one answers404.A server started with
API_KEYchecks the bearer token; a wrong key answers403, not401.Errors are FastAPI's
{"detail": ...}, not OpenAI's{"error": {...}}. The croak message carries the body, so thedetailtext is in$@.verbose_jsonreportslanguageas a code (en), where OpenAI saysenglishand GroqEnglish. Segmentids start at 1. Each word inwordskeeps its leading space (" This"), and so does each segment'stext; the top-leveltexthas none.Fields a request did not ask for are present as JSON
null, not missing:wordswithout word timestamps,usageandlogprobs. Read@{ $result->{words} // [] }. Anullusagegives a Langertha::CallResult withoutusage.srtandtextcome astext/plain; charset=utf-8,vttastext/vtt; charset=utf-8. "transcription_response" in Langertha::Role::OpenAICompatible returns each body as text.
Langertha::Engine::OpenAI exposes a whisper attribute that returns a Langertha::Engine::TranscriptionBase bound to the OpenAI cloud (sharing its api_key and url) — use that when you want OpenAI's hosted Whisper endpoint without re-stating credentials.
THIS API IS WORK IN PROGRESS
SEE ALSO
https://github.com/speaches-ai/speaches - speaches (formerly faster-whisper-server)
Langertha::Engine::TranscriptionBase - Parent base class
Langertha::Engine::OpenAI - Provides a
whisperhandle reusing its credentialsLangertha::Engine::Groq - Groq's hosted Whisper transcription
Langertha::Role::Transcription - Transcription role
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/langertha/issues.
IRC
Join #langertha on irc.perl.org or message Getty directly.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <getty@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus https://raudssus.de/.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.