@mastra/speech-elevenlabs
TypeScript icon, indicating that this package has built-in type declarations

0.1.11 • Public • Published

⚠️ DEPRECATED

This package has been deprecated in favor of @mastra/voice-elevenlabs.

Migration

To migrate to the new package:

  1. Install the new package:
npm install @mastra/voice-elevenlabs
  1. Update your imports:
- import { ElevenLabsTTS } from '@mastra/speech-elevenlabs'
+ import { ElevenLabsVoice } from '@mastra/voice-elevenlabs'
  1. Update your code:
- const tts = new ElevenLabsTTS({
-   model: {
-     name: 'Adam',
-     apiKey: 'your-api-key'
-   }
- });
+ const voice = new ElevenLabsVoice({
+   speechModel: {
+     name: 'eleven_multilingual_v2',
+     apiKey: 'your-api-key'
+   },
+   speaker: 'Adam'
+ });

- const voices = await tts.voices();
+ const speakers = await voice.getSpeakers();

- const result = await tts.generate({ voice: 'Adam', text: 'Hello' });
+ const stream = await voice.speak('Hello', { speaker: 'Adam' });

All functionality remains the same - only the API structure has changed to be more consistent with other voice packages.

Readme

Keywords

none

Package Sidebar

Install

npm i @mastra/speech-elevenlabs

Weekly Downloads

522

Version

0.1.11

License

none

Unpacked Size

34.7 kB

Total Files

14

Last publish

Collaborators

  • smthomas
  • abhiaiyer
  • ifedayo
  • adeleke5140
  • taofeeq-deru
  • ehindero
  • calcsam
  • rase-
  • wardpeet
  • tylerbarnes
  • nikaiyer