serp-ai / bark-with-voice-clone

🔊 Text-prompted Generative Audio Model - With the ability to clone voices
https://serp.ai/tools/bark-text-to-speech-ai-voice-clone-app
Other
3.06k stars 409 forks source link

Assertion error, when generating after cloning #24

Open AndreyRGW opened 1 year ago

AndreyRGW commented 1 year ago
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
Cell In[15], line 2
      1 # simple generation
----> 2 audio_array = generate_audio(text_prompt, history_prompt=voice_name, text_temp=0.7, waveform_temp=0.7)

File f:\WBC\bark-with-voice-clone\bark\api.py:113, in generate_audio(text, history_prompt, text_temp, waveform_temp, silent, output_full)
     94 """Generate audio array from input text.
     95 
     96 Args:
   (...)
    105     numpy audio array at sample frequency 24khz
    106 """
    107 semantic_tokens = text_to_semantic(
    108     text,
    109     history_prompt=history_prompt,
    110     temp=text_temp,
    111     silent=silent,
    112 )
--> 113 out = semantic_to_waveform(
    114     semantic_tokens,
    115     history_prompt=history_prompt,
    116     temp=waveform_temp,
    117     silent=silent,
    118     output_full=output_full,
...
    570 )
    571 x_coarse_history = _flatten_codebooks(x_coarse_history) + SEMANTIC_VOCAB_SIZE
    572 # trim histories correctly

AssertionError: 
SunixLiu commented 1 year ago

Same issue here, could not figure out why.

gianfrancolombardo commented 1 year ago

Same issue here, could not figure out why.

Tywors commented 1 year ago

Same issue

NickAnastasoff commented 1 year ago

I made a fix just by changing the rounding. heres the pr https://github.com/serp-ai/bark-with-voice-clone/pull/28

Tywors commented 1 year ago

I made a fix just by changing the rounding. heres the pr #28

Thanks, i will check

Tywors commented 1 year ago

Doing tests, with different audio files, there is audio that does clone them and others give this issue

NickAnastasoff commented 1 year ago

from what ive seen, the assert statements arent doing anything there, so I think you can just comment them out

abhiprojectz commented 1 year ago

I have fixed the issue, and its working fine for anyone interested reply here.

Ishani71199 commented 1 year ago

@abhiprojectz how did you solve?