Open Ousman37 opened 9 months ago
Thank you for your feedback! You bring up some important points. To ensure a seamless user experience, I'll make the following updates:
We'll add a check to see if there is an ElevenLabs API key available. If the key is available, we'll prioritize using ElevenLabs for audio generation. If the key is missing or the ElevenLabs generation fails, we'll then fall back to using browser-based TTS.
The feature will handle the decision-making process, making it more user-friendly and transparent.
I'll make these changes and update the PR accordingly. Thanks for your input!
For example, in the Reader
component:
fallback
variable to true
Thanks for your feedback! I'll follow your advice:
Your input is appreciated
Didi
@Fermain I've implemented the suggestion for TTS Fallback Option in the BrowserTTS Component. Could you please review
@Fermain and @pretzL Implement browser-based Text-to-Speech (TTS) functionality
This PR implements browser-based Text-to-Speech (TTS) functionality as requested. It introduces the following changes:
generateBrowserTTS.ts
, fetchElevenLabsAudio.ts
, and convertBlobToDataUrl.ts
to encapsulate individual TTS functions.BrowserTTS.svelte
to match the new file structure.I hope this is the way you want it! These changes improve code organization and make it easier to maintain and extend the TTS functionality. The generateAudio
function now provides the desired TTS features while allowing for fallback options when needed.
Please review and merge when ready. 🚀
Added a browser-based TTS fallback option to ensure text-to-speech availability, especially when premium services are inaccessible.