JonathanFly / bark

🚀 BARK INFINITY GUI CMD 🎶 Powered Up Bark Text-prompted Generative Audio Model
MIT License
997 stars 92 forks source link

new issue #77

Open tomas122727 opened 1 year ago

tomas122727 commented 1 year ago

this is when im generating the audio ? segment_text: hello i am ai voice --Segment 1/1: est. 2.00s (1 of 1 iterations) hello i am ai voice Traceback (most recent call last): File "C:\Users\tomas_000\AppData\Roaming\Python\Python310\site-packages\gradio\routes.py", line 422, in run_predict output = await app.get_blocks().process_api( File "C:\Users\tomas_000\AppData\Roaming\Python\Python310\site-packages\gradio\blocks.py", line 1323, in process_api result = await self.call_function( File "C:\Users\tomas_000\AppData\Roaming\Python\Python310\site-packages\gradio\blocks.py", line 1051, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Users\tomas_000\AppData\Roaming\Python\Python310\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\tomas_000\AppData\Roaming\Python\Python310\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "C:\Users\tomas_000\AppData\Roaming\Python\Python310\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "C:\Users\tomas_000\AppData\Roaming\Python\Python310\site-packages\gradio\helpers.py", line 588, in tracked_fn response = fn(args) File "C:\Users\tomas_000\Desktop\bark-main\bark_webui.py", line 432, in generate_audio_long_gradio full_generation_segments, audio_arr_segments, final_filename_will_be = api.generate_audio_long_from_gradio(kwargs) File "C:\Users\tomas_000\Desktop\bark-main\bark_infinity\api.py", line 829, in generate_audio_long_from_gradio full_generation_segments, audio_arr_segments, final_filename_will_be = generate_audio_long(kwargs) File "C:\Users\tomas_000\Desktop\bark-main\bark_infinity\api.py", line 1123, in generate_audio_long write_one_segment(audio_arr = np.concatenate(audio_arr_segments), full_generation = full_generation_segments[0], kwargs) File "C:\Users\tomas_000\Desktop\bark-main\bark_infinity\api.py", line 360, in write_one_segment write_seg_wav(filepath, audio_arr, kwargs) File "C:\Users\tomas_000\Desktop\bark-main\bark_infinity\api.py", line 409, in write_seg_wav write_audiofile(filepath, audio_arr, **kwargs) File "C:\Users\tomas_000\Desktop\bark-main\bark_infinity\api.py", line 436, in write_audiofile audio = AudioSegment.from_wav(temp_wav) File "C:\Users\tomas_000\AppData\Roaming\Python\Python310\site-packages\pydub\audio_segment.py", line 808, in from_wav return cls.from_file(file, 'wav', parameters=parameters) File "C:\Users\tomas_000\AppData\Roaming\Python\Python310\site-packages\pydub\audio_segment.py", line 728, in from_file info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit) File "C:\Users\tomas_000\AppData\Roaming\Python\Python310\site-packages\pydub\utils.py", line 274, in mediainfo_json res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE) File "C:\Program Files\Python310\lib\subprocess.py", line 971, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Program Files\Python310\lib\subprocess.py", line 1440, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified

JonathanFly commented 1 year ago

This means you need some audio for proper file formats. In fact the problem might be I switched the default from mp4 to mp3.

If you set it to wav, it will work for now. Or try mp4 instead of mp3. (mp3 is default)

Try

pip install av

or

conda install -c conda-forge ffmpeg
conda install -c conda-forge ffmpeg-python
tomas122727 commented 1 year ago

no this is when im using the regular tts ?

tomas122727 commented 1 year ago

i choose the speaker and i just typed up text i am a bot just testing this and im trying to just generate audio from my text and it comes up with this error also is my bark infinity folder supposed to be 32 mb in size ?

JonathanFly commented 1 year ago

The wav files are pretty big.

First try update:

git pull
mamba env update -f environment-cuda.yml
python -m pip install --upgrade pip
pip install --upgrade setuptools 
pip install -r requirements_conda_missing.txt

Then if that doesn't help try wav or mp4

--output_format wav

or

--output_format mp4

Capture

JonathanFly commented 1 year ago

You can also try install regular windows ffmpeg. Try to install it so if you type:

ffmpeg -version

it works where you run bark.

I will probably be in Bark Discord if you need help, end of Monday or Tuesday AM.

JonathanFly commented 1 year ago

I think I have a fix that works in most systems, more reliably.

pip install ffmpeg-downloader
ffdl install --add-path 

That install ffmpeg via python library designed for it, and seems to do it in a way where torch and python can more reliably find and use it. After you run those commands you have to exit the miniconda prompt (or the terminal if you aren't using conda or mamba at all) and restart.

Then type

ffmpeg -version
ffprobe -version

to make sure they work.

I'll to a quick update today and maybe a bigger install update...

Zyphyrs commented 1 year ago

Can I have the link of discord group? I'm kinda overwhelmed with all of this button. 😅

JonathanFly commented 1 year ago

It's the Bark discord: https://github.com/suno-ai/bark link on the top of the readme.

Zyphyrs commented 1 year ago

Thank you!🤝