Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add eleven labs tts support #13

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rzc331
Copy link

@rzc331 rzc331 commented Jun 24, 2023

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
Copy link

netlify bot commented Jun 24, 2023

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
Copy link
Author

rzc331 commented Jun 24, 2023

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
Copy link
Author

rzc331 commented Jun 24, 2023

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

@rzc331
Copy link
Author

rzc331 commented Jun 25, 2023

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