NAME

Langertha::Engine::TranscriptionBase - Base class for OpenAI-compatible transcription-only engines

VERSION

version 0.503

SYNOPSIS

package My::TranscriptionEngine;
use Moose;
extends 'Langertha::Engine::TranscriptionBase';

has '+url' => ( default => 'https://api.example.com/v1' );

sub _build_api_key { $ENV{MY_API_KEY} || die "MY_API_KEY required" }
sub default_transcription_model { 'whisper-large-v3' }   # optional

__PACKAGE__->meta->make_immutable;

DESCRIPTION

Slim base class for engines that only do audio transcription via the OpenAI-shape /audio/transcriptions endpoint. Unlike Langertha::Engine::OpenAIBase, this does not compose Langertha::Role::Chat / Langertha::Role::Tools / Langertha::Role::Embedding / Langertha::Role::ImageGeneration — callers get a focused object with simple_transcription and nothing else.

Langertha::Engine::Whisper is the canonical concrete subclass for self-hosted Whisper servers; Langertha::Engine::OpenAI exposes a whisper attribute that returns a TranscriptionBase configured for the OpenAI cloud (sharing the parent's api_key and url) so chat-side code can grab a transcription handle without re-stating the credentials.

transcription_model defaults to whisper-1, the model name OpenAI-compatible transcription servers widely accept. OpenAI's newer gpt-transcribe is only the default on Langertha::Engine::OpenAI and its whisper handle, since other servers do not know it. A subclass for a server that wants another default overrides default_transcription_model (Langertha::Engine::Whisper returns '' and lets the server choose); a caller can always pass transcription_model.

SEE ALSO

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.