You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[AsTool('eleven_labs', description: 'Convert text to speech / voice')]
23
+
#[AsTool('text_to_speech', description: 'Convert text to speech / voice')]
23
24
finalreadonlyclass ElevenLabs
24
25
{
25
26
publicfunction__construct(
@@ -29,6 +30,13 @@ public function __construct(
29
30
privatestring$model,
30
31
privatestring$voice,
31
32
) {
33
+
if (!class_exists(Filesystem::class)) {
34
+
thrownewRuntimeException('For using the ElevenLabs TTS tool, the symfony/filesystem package is required. Try running "composer require symfony/filesystem".');
35
+
}
36
+
37
+
if (!class_exists(Uuid::class)) {
38
+
thrownewRuntimeException('For using the ElevenLabs TTS tool, the symfony/uid package is required. Try running "composer require symfony/uid".');
39
+
}
32
40
}
33
41
34
42
/**
@@ -39,10 +47,6 @@ public function __construct(
39
47
*/
40
48
publicfunction__invoke(string$text): array
41
49
{
42
-
if (!class_exists(Filesystem::class)) {
43
-
thrownewRuntimeException('For using the ElevenLabs TTS tool, the symfony/filesystem package is required. Try running "composer require symfony/filesystem".');
0 commit comments