-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathAudioInterface.php
More file actions
77 lines (68 loc) · 2.01 KB
/
Copy pathAudioInterface.php
File metadata and controls
77 lines (68 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
/**
* Part of the Joomla Framework AI Package
*
* @copyright (C) 2025 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE
*/
namespace Joomla\AI\Interface;
use Joomla\AI\Response\Response;
/**
* AI provider audio capability interface.
*
* @since __DEPLOY_VERSION__
*/
interface AudioInterface
{
/**
* Generate speech audio from text input.
*
* @param string $text The text to convert to speech
* @param array $options Additional options for speech generation
*
* @return Response
* @since __DEPLOY_VERSION__
*/
public function speech(string $text, array $options = []): Response;
/**
* Get available voices for speech generation.
*
* @return array Array of available voice names
* @since __DEPLOY_VERSION__
*/
public function getAvailableVoices(): array;
/**
* Get available TTS models for this provider.
*
* @return array Array of available TTS model names
* @since __DEPLOY_VERSION__
*/
public function getTTSModels(): array;
/**
* Get supported audio output formats.
*
* @return array Array of supported format names
* @since __DEPLOY_VERSION__
*/
public function getSupportedAudioFormats(): array;
/**
* Transcribe audio to text.
*
* @param string $audioFile Path to the audio file to transcribe
* @param array $options Additional options for transcription
*
* @return Response
* @since __DEPLOY_VERSION__
*/
public function transcribe(string $audioFile, array $options = []): Response;
/**
* Translate audio to English text.
*
* @param string $audioFile Path to audio file to translate
* @param array $options Additional options
*
* @return Response
* @since __DEPLOY_VERSION__
*/
public function translate(string $audioFile, array $options = []): Response;
}