Skip to content

feat: Add Text-to-Speech #2012

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

Merged
merged 4 commits into from
Aug 23, 2024
Merged

feat: Add Text-to-Speech #2012

merged 4 commits into from
Aug 23, 2024

Conversation

mkummer225
Copy link
Contributor

Description

This PR adds text-to-speech functionality using built-in, system TTS programs ("say ...", "espeak ...", etc).

It can be enabled via experimental.readResponseTTS in continue's config.json

TTS should work for OSX, Windows, and linux where espeak is available – this PR still needs testing on Windows and Linux to confirm their implementations.

When enabled, TTS will start after the full chat has been streamed. It will skip reading code blocks and only read the top level text response. When initiating a new chat it will automatically stop any current TTS. Additionally, there's a button added to the bottom of the sidebar (shown below) to manually stop TTS.

Checklist

  • The base branch of this PR is dev, rather than main
  • The relevant docs, if any, have been updated or created

Screenshots

image

A Stop TTS button has been added to the bottom of the sidebar while TTS is active. Clicking the button will stop the current TTS

Testing

Pull and debug this branch then set experimental.readResponseTTS to true in your config. Initiate a new chat with an LLM and after receiving the full response it should start reading aloud using your system's TTS capabilities.

@mkummer225 mkummer225 mentioned this pull request Aug 14, 2024
2 tasks
@mkummer225 mkummer225 changed the title Add Text-to-Speech feat: Add Text-to-Speech Aug 14, 2024
Copy link
Contributor

@sestinj sestinj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkummer225 this is so cool! Small comments, let me know what you think. Very glad to see that you designed this so that it's open for extensibility with other providers

@mkummer225 mkummer225 requested a review from sestinj August 16, 2024 00:51
@mkummer225
Copy link
Contributor Author

@sestinj thanks! Yup just incorporated those changes – definitely wanted to get a quick solution out (+wade in gently with my first PR) while giving any future TTS a home

Pretty cool (& fast) CPU based model I came across while working this:

mkummer225

This comment was marked as duplicate.

@sestinj
Copy link
Contributor

sestinj commented Aug 23, 2024

Congrats on PR number 1!

@sestinj sestinj merged commit 054c761 into continuedev:dev Aug 23, 2024
1 check passed
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.

2 participants