|
24 | 24 |
|
25 | 25 | require_once dirname(__DIR__).'/bootstrap.php'; |
26 | 26 |
|
27 | | -$eventDispatcher = new EventDispatcher(); |
28 | | -$eventDispatcher->addSubscriber(new SpeechProviderListener([ |
29 | | - new ElevenLabsSpeechProvider(new SpeechAwarePlatform( |
30 | | - PlatformFactory::create( |
31 | | - apiKey: env('ELEVEN_LABS_API_KEY'), |
32 | | - httpClient: http_client(), |
33 | | - ), |
34 | | - speechConfiguration: new SpeechConfiguration( |
35 | | - ttsModel: 'eleven_multilingual_v2', |
36 | | - ttsVoice: 'Dslrhjl3ZpzrctukrQSN', // Brad (https://elevenlabs.io/app/voice-library?voiceId=Dslrhjl3ZpzrctukrQSN) |
37 | | - sttModel: 'eleven_multilingual_v2' |
38 | | - )), |
39 | | - ), |
40 | | -], [ |
41 | | - new ElevenLabsSpeechListener(PlatformFactory::create( |
| 27 | +$speechAwarePlatform = new SpeechAwarePlatform( |
| 28 | + PlatformFactory::create( |
42 | 29 | apiKey: env('ELEVEN_LABS_API_KEY'), |
43 | 30 | httpClient: http_client(), |
44 | | - speechConfiguration: new SpeechConfiguration( |
45 | | - sttModel: 'scribe_v1' |
46 | | - )), |
47 | 31 | ), |
| 32 | + new SpeechConfiguration( |
| 33 | + ttsModel: 'eleven_multilingual_v2', |
| 34 | + ttsVoice: 'Dslrhjl3ZpzrctukrQSN', // Brad (https://elevenlabs.io/app/voice-library?voiceId=Dslrhjl3ZpzrctukrQSN) |
| 35 | + sttModel: 'eleven_multilingual_v2' |
| 36 | + ), |
| 37 | +); |
| 38 | + |
| 39 | +$eventDispatcher = new EventDispatcher(); |
| 40 | +$eventDispatcher->addSubscriber(new SpeechProviderListener([ |
| 41 | + new ElevenLabsSpeechProvider($speechAwarePlatform), |
| 42 | +], [ |
| 43 | + new ElevenLabsSpeechListener($speechAwarePlatform), |
48 | 44 | ])); |
49 | 45 |
|
50 | 46 | $platform = OpenAiPlatformFactory::create(env('OPENAI_API_KEY'), httpClient: http_client(), eventDispatcher: $eventDispatcher); |
|
0 commit comments