Is it possible to use this inside python? #220
Replies: 12 comments 9 replies
-
Yes, there are apis that you can import and use in your own project. I'm
not sure how to quantify the difficulty of doing that, though. Also,
because this was originally a gradio project, many of the functions are
quite awkward. As I move away from gradio, the functions will become more
API like.
…On Mon, Nov 27, 2023, 3:38 PM Nurul Fhakri ***@***.***> wrote:
Sorry if this question sounds silly, I just started last month getting
into coding etc. I have checked, but I can't find a way to use it inside my
chatbot. Please let me know if I do miss something.
—
Reply to this email directly, view it on GitHub
<#220>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTRXI5HYBPZDADH4XIVXRDYGQ7OVAVCNFSM6AAAAAA73SLRWOVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZVHA4TKNJRG4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
There's a file named like "bark generation tab" and that file has
generation helper functions. I think ChatGPT might be able to guide you as
to which functions might be useful to you, I'm guessing the "basic"
generate one.
Feel free to ask more questions. I can't check this myself until I'm back
to work.
…On Tue, Nov 28, 2023, 12:04 AM Nurul Fhakri ***@***.***> wrote:
Hi, apologies for asking again. I am quite new with programming actually.
How to connect with the API like you just mentioned? I have tried the
standard Bark, but it is very slow. If there any some guide available, I
would like to know. Plus, I already have one voice with specific seed.
Apologize for the inconvenient.
—
Reply to this email directly, view it on GitHub
<#220 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTRXIYDRW5H33P7OV2JWUTYGS2YZAVCNFSM6AAAAAA73SLRWOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TMOBSHAYDK>
.
You are receiving this because you commented.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
Sure, and I hope you can proceed. As for the ease of things, I'll just say
that you'd be surprised how much consultations cost if it's a workplace
setting.
…On Tue, Nov 28, 2023, 12:29 AM Nurul Fhakri ***@***.***> wrote:
Hey, I got it. Thanks a lot, this is really helpful. I have checked the
function, even though I'm not sure what's going on side it, still I can
work with GPT Sensei. This might be simple for you, but it helps me a lot
since I've been stuck for more than a week now. Truly appreciate it. I will
be back again if I'm stuck.
—
Reply to this email directly, view it on GitHub
<#220 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTRXI7ER5VLOXP24ITBRLDYGS5WBAVCNFSM6AAAAAA73SLRWOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TMOBTGA3DI>
.
You are receiving this because you commented.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
Don't hesitate to ask, if it's too much or anything, people might let you
know. Also, there's always a chance somebody is facing the same problem and
can help you out!
…On Tue, Nov 28, 2023, 10:26 PM Nurul Fhakri ***@***.***> wrote:
I didn't know people were charging it. This actually makes me hesitate to
ask in the community because people do it for a living. I've been working
on it since morning till midnight, still no hope, ChatGPT keeps making very
strange guides.
—
Reply to this email directly, view it on GitHub
<#220 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTRXI3LXFBEZG3LBZLLHK3YGXYCJAVCNFSM6AAAAAA73SLRWOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TMOJSHE4DI>
.
You are receiving this because you commented.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
I am trying to use it inside my python program. But to just copy the 'generation_tab_bark.py' content and remove the Gradio will not working because it relies on other function too to operate. Normal bark or small bark still run slow on my machine but not this one, if can, I want to know how it works. Sorry if it too much. |
Beta Was this translation helpful? Give feedback.
-
It shouldn't run at a different speed. By the way, if you have the code for
normal bark, like import ... from bark etc, you can use it within this
project, as it has the regular bark in itself. You do lose some features
though, but that could be useful.
Also this project uses conda, so if you want to run
`python file.py`
you must do it inside of an activated conda environment, i.e.,
cmd_windows.bat
…On Wed, Nov 29, 2023, 9:40 AM Nurul Fhakri ***@***.***> wrote:
I am trying to use it inside my python program. But to just copy the
'generation_tab_bark.py' content and remove the Gradio will not working
because it relies on other function too to operate. Normal bark or small
bark still run slow on my machine but not this one, if can, I want to know
how it works. Sorry if it too much.
—
Reply to this email directly, view it on GitHub
<#220 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTRXI7NHPLW4GFJONAU2STYG2HAHAVCNFSM6AAAAAA73SLRWOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TMOJYGY4DE>
.
You are receiving this because you commented.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
See that's a bit of a mystery. Can you verify that the original bark is
using your GPU?
Also, you might need to specify kv_cache true when calling bark directly. I
might be spacing out but I can't remember any super optimizations applied
to bark that are not in the official repository.
Alternatively, there could be some libraries that are missing from your
original setup. In that case, the your bark code would still be faster when
used within this repo.
…On Wed, Nov 29, 2023, 2:34 PM Nurul Fhakri ***@***.***> wrote:
I use Conda, bark-small env. What I mean is, my code with bark-small is
slow in generating output. Compared to your version of Gradio which is very
fast, not to mention the quality is also good. That's why I want to use it
in my project.
—
Reply to this email directly, view it on GitHub
<#220 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTRXIZ3ON2BCBIFZV5U35LYG3JP7AVCNFSM6AAAAAA73SLRWOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TOMBQGU2TQ>
.
You are receiving this because you commented.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
Oh, right, that's interesting, the transformers version of bark is supposed
to be *faster*. There's another way to use bark - their official repository
without transformers. It might be the case that your GPU runs that version
faster, since it's what I'm using. As for the kV cache, I don't remember if
it's enabled by default for transformers. If not, that's a big performance
loss.
I'll be back to my desk in a few weeks time, then I can give more workable
code. But don't limit yourself by my schedule, I think whatever might be
the root cause, you are close to dealing with it.
…On Thu, Nov 30, 2023, 3:22 PM Nurul Fhakri ***@***.***> wrote:
This is my code if you don't mind checking. It is very basic, but I do
hope it can achieve like what your Gradio version did.
app2_vpreset.zip
<https://github.com/rsxdalv/tts-generation-webui/files/13509708/app2_vpreset.zip>
—
Reply to this email directly, view it on GitHub
<#220 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTRXI2XESHPQ6KDNQXNTJ3YHAXZNAVCNFSM6AAAAAA73SLRWOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TOMJUGA4TC>
.
You are receiving this because you commented.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
Are you using a voice as well?
…On Sun, Dec 3, 2023, 7:28 PM Nurul Fhakri ***@***.***> wrote:
Thank you soo much. Actually I have found few other options. I can clone
and stream it Realtime, but somehow it lack the identity of that voice.
With seed, the voice have it's own pattern and identity, like a
personality. Still, it better than nothing.
—
Reply to this email directly, view it on GitHub
<#220 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTRXIZPAF6CAXGFEPBM55LYHRO5HAVCNFSM6AAAAAA73SLRWOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TONBTGIZDI>
.
You are receiving this because you commented.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
XTTS is basically tortoise. I'm still not sure - are you using bark but
without a voice preset? For example, en_speaker_2
…On Sun, Dec 3, 2023, 11:02 PM Nurul Fhakri ***@***.***> wrote:
I'm using "coqui/XTTS-v2", it can copy the voice nicely as long the sample
quality is good, but it lacks personality. I also have tried others like
"OnlySpeakTTS", but it's not like what I wanted. So far,
"tts-generation-webui" is the only one that give me the voice output with
personality due to 'seed'. Seed can give voice life and identity.
—
Reply to this email directly, view it on GitHub
<#220 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTRXI773Y45YBKASXKRV63YHSIADAVCNFSM6AAAAAA73SLRWOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TONBUGEYDA>
.
You are receiving this because you commented.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
Got it, I'll explain more once I'm back at the end of the week. You can use
custom voices via python and tortoise can be made faster. Also, and I
understand that the UI does not make this obvious in any way, but
tortoise/XTTS + RVC is a good combo. Given how people want to use these
models, I think I'll include some more lightweight models someday.
…On Mon, Dec 4, 2023, 12:34 PM Nurul Fhakri ***@***.***> wrote:
I do not know XTTS-v2 came from Tortoise, because the original Tortoise is
really slow. XTTS-v2 can copy/clone voice from audio sample with a simple
python code.
As for Bark, I can't use my custom voice, only your webui version can do
it. That is why I'm reaching you here to write the code just for that. The
example that I gave you is using the preset from Bark, not the custom one.
—
Reply to this email directly, view it on GitHub
<#220 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTRXI5M4PC3MEKKCGP2D43YHVHHDAVCNFSM6AAAAAA73SLRWOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TONBYHE3TC>
.
You are receiving this because you commented.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
Hi, what's your status on this?
…On Mon, Dec 4, 2023, 1:57 PM Nurul Fhakri ***@***.***> wrote:
Thanks, really appreciate it.
—
Reply to this email directly, view it on GitHub
<#220 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTRXI6BMIAMKNG4QNKWW43YHW3EFAVCNFSM6AAAAAA73SLRWOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TONJSGI4DS>
.
You are receiving this because you commented.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
Sorry if this question sounds silly, I just started last month getting into coding etc. I have checked, but I can't find a way to use it inside my chatbot. Please let me know if I do miss something.
Beta Was this translation helpful? Give feedback.
All reactions