Skip to content

feat: add eleven labs tts support - #13

Open
rzc331 wants to merge 3 commits into
sonngdev:mainfrom
rzc331:eleven_labs
Open

rzc331 wants to merge 3 commits into
sonngdev:mainfrom
rzc331:eleven_labs

Conversation

@rzc331

@rzc331 rzc331 commented Jun 24, 2023

Copy link
Copy Markdown

I created a side feature that supports eleven labs text to speech, for those who are not very satisfied with unnatural system built-in synthetic voice.

The feature was hastily written (mostly by ChatGPT), it works but it replaces the built-in synthetic voice option. Maybe a better implementation is needed to add eleven labs into the voice list.

All you need to do is to fill in your ELEVEN_LABS_API_KEY in eleven_labs.ts under ./src/lib

@netlify

netlify Bot commented Jun 24, 2023

Copy link
Copy Markdown

Deploy Preview for cheery-chimera-7662dd ready!

Name Link
🔨 Latest commit 6e8bd4f
🔍 Latest deploy log https://app.netlify.com/sites/cheery-chimera-7662dd/deploys/6498509d6ef8a40008629c1c
😎 Deploy Preview https://deploy-preview-13--cheery-chimera-7662dd.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@rzc331

rzc331 commented Jun 24, 2023

Copy link
Copy Markdown
Author

two params (stability, similarity_boost) can be adjusted for the target voiceId in eleven_labs.ts

const data = {
        text: text,
        voice_settings: { stability: 0, similarity_boost: 0 }
    };

@rzc331

rzc331 commented Jun 24, 2023

Copy link
Copy Markdown
Author

Also included support for returning lines (\n) in text messages. Lots of replies from ChatGPT have paragraphs

@rzc331

rzc331 commented Jun 25, 2023

Copy link
Copy Markdown
Author

Added support to print response word by word in a fixed interval. Again, code mostly written by ChatGPT so it's not that perfect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant