-
Notifications
You must be signed in to change notification settings - Fork 1
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 Lobehub TTS service for custom endpoint like ollama #107
Conversation
@@ -72,6 +72,7 @@ export async function learn(options: LearnOptions = {}) { | |||
ankiService, | |||
openaiService, | |||
options.debug, | |||
config.global.ttsVoice, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remember to update other ContentManager usage
src/commands/serve.ts
Outdated
@@ -28,7 +28,7 @@ export async function serve(options: ServeOptions = {}) { | |||
config.global.openai.ttsModel, | |||
debug, | |||
); | |||
const contentManager = new ContentManager(ankiService, openaiService, debug); | |||
const contentManager = new ContentManager(ankiService, openaiService,debug); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use bun run fmt to ensure code formatting consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5527e22
to
6df39fb
Compare
BTW, I found that we just need |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your awesome contribution! It is hugely appreciated.
Summary
When use Chatgpt's model with openai client, you don't need further settings for TTS service, but we have to add custom TTS service for ollama. (However, we can use openai client with ollama directly.)
To test this feature, you need to set the config as below:
The
ttsVoice
is changed to set within each responseField.And
decks.responseFields
also need to be set asYou can see all of the available voices here
Screenshot
Screen.Recording.2025-02-02.at.6.54.57.PM.mov