Langertha/Engine/Whisper.pm

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