File tree Expand file tree Collapse file tree 7 files changed +10
-5
lines changed
Expand file tree Collapse file tree 7 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -501,6 +501,9 @@ This allows fast and isolated testing of AI-powered features without relying on
501501
502502 This requires `cURL ` and the `ext-curl ` extension to be installed.
503503
504+ Adding Voice
505+ ~~~~~~~~~~~~
506+
504507Code Examples
505508~~~~~~~~~~~~~
506509
Original file line number Diff line number Diff line change 1717use Symfony \AI \Platform \Message \MessageBag ;
1818use Symfony \AI \Platform \PlatformInterface ;
1919use Symfony \AI \Platform \Result \ResultInterface ;
20- use Symfony \AI \Voice \VoiceProviderInterface ;
20+ use Symfony \AI \Platform \ Voice \VoiceProviderInterface ;
2121
2222/**
2323 * @author Christopher Hertel <mail@christopher-hertel.de>
@@ -37,7 +37,7 @@ final class Agent implements AgentInterface
3737 /**
3838 * @var VoiceProviderInterface[]
3939 */
40- private array $ voiceProviders ;
40+ private readonly array $ voiceProviders ;
4141
4242 /**
4343 * @param InputProcessorInterface[] $inputProcessors
Original file line number Diff line number Diff line change 1313
1414use Symfony \AI \Platform \Message \MessageBag ;
1515use Symfony \AI \Platform \Result \ResultInterface ;
16+ use Symfony \AI \Platform \Voice \Voice ;
1617
1718/**
1819 * @author Christopher Hertel <mail@christopher-hertel.de>
Original file line number Diff line number Diff line change 102102use Symfony \AI \Store \Indexer ;
103103use Symfony \AI \Store \IndexerInterface ;
104104use Symfony \AI \Store \StoreInterface ;
105- use Symfony \AI \Voice \Bridge \ElevenLabs \VoiceProvider as ElevenLabsVoiceProvider ;
105+ use Symfony \AI \Voice \Bridge \ElevenLabs \ElevenLabsVoiceProvider as ElevenLabsVoiceProvider ;
106106use Symfony \AI \Voice \VoiceProviderInterface ;
107107use Symfony \Component \Clock \ClockInterface ;
108108use Symfony \Component \Config \Definition \Configurator \DefinitionConfigurator ;
Original file line number Diff line number Diff line change 2020/**
2121 * @author Guillaume Loulier <personal@guillaumeloulier.fr>
2222 */
23- final class VoiceProvider implements VoiceProviderInterface, VoiceListenerInterface
23+ final class ElevenLabsVoiceProvider implements VoiceProviderInterface, VoiceListenerInterface
2424{
2525 public const ELEVEN_LABS_STT_MODEL = 'eleven_labs.stt_model ' ;
2626
Original file line number Diff line number Diff line change 1818use Symfony \AI \Platform \ModelCatalog \ModelCatalogInterface ;
1919use Symfony \AI \Platform \Result \DeferredResult ;
2020use Symfony \AI \Platform \Result \RawResultInterface ;
21+ use Symfony \AI \Platform \Voice \VoiceListenerInterface ;
2122
2223/**
2324 * @author Christopher Hertel <mail@christopher-hertel.de>
Original file line number Diff line number Diff line change 1313
1414use PHPUnit \Framework \TestCase ;
1515
16- final class VoiceProviderTest extends TestCase
16+ final class ElevenLabsVoiceProviderTest extends TestCase
1717{
1818}
You can’t perform that action at this time.
0 commit comments