Comments (2)
I don't know python and sorry if this is bad github etiquette but this is how I would do it: Instead of using ||
as the split point, I would use :
and (
and the last character (the :
has a space next to it and the (
has a space behind it)
First step:
I would start by checking if the first character it's a (
. If it is I would set a default voice and then I would check if the text next to it matches a playsound id such as 2)
3)
4)
etc. If it matches then I would queue that sound then I would search for the next split point.
If it doesn't match I would set a default voice then I would search for the next split point.
If it doesn't start with (
I would check if the first word has a :
next to it, if it does I would check if that word matches a voice-list, if it does match I would save that as the first voice, if it doesn't I would use a default voice. Then I would search for the next split point.
Split points:
if it's :
i would check if the word behind it matches a voice-list, if it does I would save that voice as the next voice and I would remove the last word from the previous sentence (since the last word will be the voice id for the next sentence) and that would be the previous message (played with the previous saved voice). Then I would search for the next split point.
If it doesn't match I would use the voice I saved on the previous scan for the previous sentence, then I would search for the next split point.
if it's (
i would check if the text next to it matches a playsound id such as 2)
3)
4)
etc. If it matches I would save the text behind it as a message (minus the (
) to play with the previous voice I saved and I would queue that sound then I would search for the next split point.
If it doesn't then I would read the previous sentence (minus the (
) with the previous voice and I would search for the next split point.
if it's the last character I would stop the text reading there.
This is probably the worst way of doing it but I've been scratching my brain and this is what I could come up with
from ai-tts-donations.
closing in favor of synced linear issue #501
from ai-tts-donations.
Related Issues (20)
- [SOLP-15] pajbot banphrase checking
- [SOLP-4] potentially move to a different lower level lang?
- [SOLP-24] api request to trigger a tts for the public (?)
- [SOLP-23] random voice TTS
- [SOLP-22] sound (282) grabs a random voice_file
- [SOLP-21] rewrite python script
- [SOLP-12] add tiktok support
- [SOLB-2] stop using next.js api routes and use prisma client
- [SOLB-10] some Twitch Channel Point Rewards with descriptions, don't work
- [SOLP-25] Support regex for blacklisted words
- [SOL-13] Voice allow list
- [SOLP-26] Self hosted voices
- [SOLP-27] Syntax without ||
- [SOL-14] testing client for viewers
- [SOL-15] customizable seperator character
- [SOLP-28] implement fakeyou's `maybe_suggested_unique_bot_command` field
- [SOLP-29] Max sounds per request feature
- [SOLP-30] known bugged playsounds
- ElevenLabs support HOT 3
- Streamelements Tips Support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ai-tts-donations.