| 1 | package Langertha::Engine::Whisper; | ||
| 2 | # ABSTRACT: Whisper compatible transcription server | ||
| 3 | 10 | our $VERSION = '0.503'; | |
| 4 | 10 | ▶ | use Moose; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 10 | extends 'Langertha::Engine::TranscriptionBase'; | |
| 7 | |||
| 8 | |||
| 9 | 3 | ▶ | sub default_transcription_model { '' } |
|
Subroutine
default_transcription_model: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 10 | |||
| 11 | 0 | ▶ | sub default_model { '' } |
|
Subroutine
default_model: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 12 | |||
| 13 | 2 | ▶ | sub api_key_env { undef } |
|
Subroutine
api_key_env: called CC=1 SCAR=0.0
Pod
documented
| |||
| 14 | |||
| 15 | 10 | has '+url' => ( | |
| 16 | required => 1, | ||
| 17 | ); | ||
| 18 | |||
| 19 | 5 | ▶ | sub _build_api_key { 'whisper' } |
|
Subroutine
_build_api_key: called CC=1 SCAR=0.0
| |||
| 20 | |||
| 21 | 10 | __PACKAGE__->meta->make_immutable; | |
| 22 | |||
| 23 | |||
| 24 | 10 | 1; | |
| 25 | |||
| 26 | __END__ | ||
| 27 | |||
| 28 | =pod | ||
| 29 | |||
| 30 | =encoding UTF-8 | ||
| 31 | |||
| 32 | =head1 NAME | ||
| 33 | |||
| 34 | Langertha::Engine::Whisper - Whisper compatible transcription server | ||
| 35 | |||
| 36 | =head1 VERSION | ||
| 37 | |||
| 38 | version 0.503 | ||
| 39 | |||
| 40 | =head1 SYNOPSIS | ||
| 41 | |||
| 42 | use Langertha::Engine::Whisper; | ||
| 43 | |||
| 44 | my $whisper = Langertha::Engine::Whisper->new( | ||
| 45 | url => $ENV{WHISPER_URL}, | ||
| 46 | ); | ||
| 47 | |||
| 48 | print $whisper->simple_transcription('recording.ogg'); | ||
| 49 | |||
| 50 | =head1 DESCRIPTION | ||
| 51 | |||
| 52 | Provides access to a self-hosted Whisper-compatible transcription server. | ||
| 53 | Extends L<Langertha::Engine::TranscriptionBase> and transcribes through the | ||
| 54 | server's C</audio/transcriptions> endpoint. | ||
| 55 | |||
| 56 | C<url> is required. The API key defaults to C<'whisper'>. The transcription | ||
| 57 | model defaults to an empty string so the server uses its built-in default. | ||
| 58 | |||
| 59 | See L<https://github.com/fedirz/faster-whisper-server> for a compatible | ||
| 60 | server implementation. | ||
| 61 | |||
| 62 | L<Langertha::Engine::OpenAI> exposes a C<whisper> attribute that returns a | ||
| 63 | L<Langertha::Engine::TranscriptionBase> bound to the OpenAI cloud (sharing | ||
| 64 | its C<api_key> and C<url>) — use that when you want OpenAI's hosted Whisper | ||
| 65 | endpoint without re-stating credentials. | ||
| 66 | |||
| 67 | B<THIS API IS WORK IN PROGRESS> | ||
| 68 | |||
| 69 | =head1 SEE ALSO | ||
| 70 | |||
| 71 | =over | ||
| 72 | |||
| 73 | =item * L<https://github.com/fedirz/faster-whisper-server> - faster-whisper-server | ||
| 74 | |||
| 75 | =item * L<Langertha::Engine::TranscriptionBase> - Parent base class | ||
| 76 | |||
| 77 | =item * L<Langertha::Engine::OpenAI> - Provides a C<whisper> handle reusing its credentials | ||
| 78 | |||
| 79 | =item * L<Langertha::Engine::Groq> - Groq's hosted Whisper transcription | ||
| 80 | |||
| 81 | =item * L<Langertha::Role::Transcription> - Transcription role | ||
| 82 | |||
| 83 | =back | ||
| 84 | |||
| 85 | =head1 SUPPORT | ||
| 86 | |||
| 87 | =head2 Issues | ||
| 88 | |||
| 89 | Please report bugs and feature requests on GitHub at | ||
| 90 | L<https://github.com/Getty/langertha/issues>. | ||
| 91 | |||
| 92 | =head2 IRC | ||
| 93 | |||
| 94 | Join C<#langertha> on C<irc.perl.org> or message Getty directly. | ||
| 95 | |||
| 96 | =head1 CONTRIBUTING | ||
| 97 | |||
| 98 | Contributions are welcome! Please fork the repository and submit a pull request. | ||
| 99 | |||
| 100 | =head1 AUTHOR | ||
| 101 | |||
| 102 | Torsten Raudssus <getty@cpan.org> | ||
| 103 | |||
| 104 | =head1 COPYRIGHT AND LICENSE | ||
| 105 | |||
| 106 | This software is copyright (c) 2026 by Torsten Raudssus L<https://raudssus.de/>. | ||
| 107 | |||
| 108 | This is free software; you can redistribute it and/or modify it under | ||
| 109 | the same terms as the Perl 5 programming language system itself. | ||
| 110 | |||
| 111 | =cut | ||