ebook2audiobook: Bark model cloned voice uploaded error
Ebook2Audiobook v25.5.6 on Windows with Gradio GUI launched with “docker run --pull always --rm --gpus all -p 7860:7860 athomasson2/ebook2audiobook”
In Gradio interface I choose TTS Engine - bark, in Russian (and English) language
I get an error
Loading TTS tts_models/multilingual/multi-dataset/bark model, it takes a while, please be patient…
100%|██████████| 3.93G/3.93G [02:02<00:00, 32.0MiB/s]
100%|██████████| 3.74G/3.74G [01:55<00:00, 32.3MiB/s]
100%|██████████| 5.35G/5.35G [02:48<00:00, 31.7MiB/s]
100%|██████████| 6.11k/6.11k [00:00<00:00, 29.9kiB/s]
100%|█████████▉| 104M/104M [00:03<00:00, 36.2MiB/s]/usr/local/lib/python3.12/site-packages/torch/nn/utils/weight_norm.py:143: FutureWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
WeightNorm.apply(module, name, dim)
Downloading: “https://dl.fbaipublicfiles.com/encodec/v0/encodec_24khz-d7cc33bc.th” to /app/models/hub/checkpoints/encodec_24khz-d7cc33bc.th]
100%|██████████| 88.9M/88.9M [00:02<00:00, 33.7MB/s]
convertsion 0.00%: 0/8 04M [00:22<00:00, 36.2MiB/s]]
Traceback (most recent call last):
File “/app/lib/classes/tts_manager.py”, line 508, in convert_sentence_to_audio
audio_data = self.params[‘tts’].tts(
^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/TTS/api.py”, line 323, in tts
wav = self.synthesizer.tts(
^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/TTS/utils/synthesizer.py”, line 422, in tts
outputs = self.tts_model.synthesize(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/TTS/tts/models/bark.py”, line 215, in synthesize
history_prompt = load_voice(self, speaker_id, voice_dirs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.12/site-packages/TTS/tts/layers/bark/inference_funcs.py”, line 66, in load_voice
paths = voices[voice]
~~~~~~^^^^^^^
KeyError: ‘Jamie’
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File “/app/lib/functions.py”, line 880, in convert_chapters_to_audio if tts_manager.convert_sentence_to_audio(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File “/app/lib/classes/tts_manager.py”, line 671, in convert_sentence_to_audio raise ValueError(e) ValueError: ‘Jamie’
in the docker image it seem to download only the following files: coarse_2.pt 3.7Gb config.json 6Kb fine_2.pt 3.5 Gb text_2.pt 5Gb tokenizer.pth 99.2 Mb
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 28 (6 by maintainers)
Commits related to this issue
- fixes #714 and disc #702 — committed to ROBERT-MCDOWELL/ebook2audiobook by ROBERT-MCDOWELL 2 years ago
- fixed #714 — committed to ROBERT-MCDOWELL/ebook2audiobook by ROBERT-MCDOWELL a year ago
finally I positive result with mad BARK. about WITH cloned voice. so I confirm the wav2npz function does not work for Bark. I must find other project using this kind of converter.
Just did a BARK test WITHOUT cloned voice and heres what happened,
Method: WEB GUI BARK No voice cloning default Ran on CPU on M1 Mac Pro 16gb ram
VERSION: v25.5.19
Test file used: test2.txt
Result output file: 👍 ✅
https://github.com/user-attachments/assets/6499f032-9468-4edc-ac29-971a500ae599
Analysis: Voice is CONSISTENT 😄
FULL LOG:
Click to expand
*********** Session: 2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa ************** Store it in case of interruption, crash, reuse of custom model or custom voice, you can resume the conversion with --session option Processing eBook file: test2.txt Available Processor Unit: CPU Running command: /opt/homebrew/bin/ebook-convert /Users/drew/ebook2audiobook/tmp/ebook-2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa/8ab98550466678b3f8827262be2e0235/test2.txt /Users/drew/ebook2audiobook/tmp/ebook-2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa/8ab98550466678b3f8827262be2e0235/__test2.epub Conversion options changed from defaults: flow_size: 0 disable_font_rescaling: True output_profile: 'generic_eink' verbose: 1 input_encoding: 'utf-8' epub_version: '3' smarten_punctuation: True 1% Converting input to HTML... InputFormatPlugin: TXT Input running on /Users/drew/ebook2audiobook/tmp/ebook-2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa/8ab98550466678b3f8827262be2e0235/test2.txt Reading text from file... Using user specified input encoding of utf-8 Auto detected paragraph type as block Auto detected formatting as heuristic Running text through basic conversion... Language not specified Creator not specified Building file list... Found files... HTMLFile:0:a:'/Users/drew/ebook2audiobook/tmp/calibre-p2e239mh/xl9flivk_plumber/index.html' Normalizing filename cases Rewriting HTML links Parsing index.html ... ********* Heuristic processing HTML ********* minimum chapters required are: 1 found 0 pre-existing headings Total wordcount is: 72, Average words per section is: 72, Marked up 0 chapters Hard line breaks check returned True Median line length is 406, calculated with html format Fixing hyphenated content Looking for more split points based on punctuation, currently have 0 Formatting scene breaks Forcing index.html into XHTML namespace 34% Running transforms on e-book... Merging user specified metadata... Detecting structure... Auto generated TOC with 0 entries. Flattening CSS and remapping font sizes... Source base font size is 12.00000pt Removing fake margins... Found 1 items of level: p_1 Ignoring level p_1 Cleaning up manifest... Trimming unused files from manifest... Creating EPUB Output... 67% Running EPUB Output plugin Splitting markup on page breaks and flow limits, if any... Generating default cover This EPUB file has no Table of Contents. Creating a default TOC Upgrading to EPUB 3... EPUB output written to /Users/drew/ebook2audiobook/tmp/ebook-2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa/8ab98550466678b3f8827262be2e0235/__test2.epub Output saved to /Users/drew/ebook2audiobook/tmp/ebook-2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa/8ab98550466678b3f8827262be2e0235/__test2.epub/opt/homebrew/Caskroom/miniconda/base/envs/ebook2audiobook/lib/python3.12/site-packages/ebooklib/epub.py:1423: FutureWarning: This search incorrectly ignores the root element, and will be fixed in a future version. If you rely on the current behaviour, change it to ‘.//xmlns:rootfile[@media-type]’ for root_file in tree.findall(‘//xmlns:rootfile[@media-type]’, namespaces={‘xmlns’: NAMESPACES[‘CONTAINERNS’]}):
NOTE: The warning “Character xx not found in the vocabulary.” MEANS THE MODEL CANNOT INTERPRET THE CHARACTER AND WILL MAYBE GENERATE (AS WELL AS WRONG PUNCTUATION POSITION) AN HALLUCINATION TO IMPROVE THIS MODEL, IT NEEDS TO ADD THIS CHARACTER INTO A NEW TRAINING MODEL. YOU CAN IMPROVE IT OR ASK TO A TRAINING MODEL EXPERT.
Loading TTS tts_models/multilingual/multi-dataset/bark model, it takes a while, please be patient… Block 1 containing 5 sentences… 100%|████████████████████████████████████████████████| 100/100 [00:13<00:00, 7.62steps/s] 100%|██████████████████████████████████████████████████| 11/11 [00:49<00:00, 4.49s/steps] 100%|████████████████████████████████████████████████| 100/100 [00:13<00:00, 7.57steps/s] 100%|██████████████████████████████████████████████████| 11/11 [00:48<00:00, 4.38s/steps] 100%|████████████████████████████████████████████████| 100/100 [00:13<00:00, 55.77steps/s] Sentence: He’d never been tripped over, even by his own feet. He’d never given me a reason to complain. 100%|████████████████████████████████████████████████| 100/100 [00:10<00:00, 9.25steps/s] 100%|████████████████████████████████████████████████████| 9/9 [00:41<00:00, 4.66s/steps] 100%|████████████████████████████████████████████████| 100/100 [00:11<00:00, 8.65steps/s] 100%|████████████████████████████████████████████████████| 9/9 [00:43<00:00, 4.85s/steps] 100%|████████████████████████████████████████████████| 100/100 [00:11<00:00, 50.94steps/s] Sentence: I was a gold-plated idiot, you know? Seriously, I didn’t evenwantany…84s/steps] 100%|████████████████████████████████████████████████| 100/100 [00:16<00:00, 6.12steps/s] 100%|██████████████████████████████████████████████████| 14/14 [01:04<00:00, 4.61s/steps] 100%|████████████████████████████████████████████████| 100/100 [00:16<00:00, 47.54steps/s] Sentence: I think it was his eye… probably a really shiny one. [01:04<00:00, 3.85s/steps] 100%|████████████████████████████████████████████████| 100/100 [00:16<00:00, 6.22steps/s] 100%|██████████████████████████████████████████████████| 13/13 [00:59<00:00, 4.59s/steps] 100%|████████████████████████████████████████████████| 100/100 [00:16<00:00, 47.20steps/s] Sentence: Yes, it was definitely this… and probably covered in glitter.0:00, 4.06s/steps] 100%|████████████████████████████████████████████████| 100/100 [00:46<00:00, 2.16steps/s] 100%|██████████████████████████████████████████████████| 35/35 [02:49<00:00, 4.83s/steps] 100%|████████████████████████████████████████████████| 100/100 [00:46<00:00, 7.88steps/s] Sentence: He had the eye of a vulture— a pale blue eye, perpetually covered in a fine layer of existential dread. End of Block 1 Input #0, concat, from ‘/Users/drew/ebook2audiobook/tmp/ebook-2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa/8ab98550466678b3f8827262be2e0235/chapters/sentences/sentences.txt’: Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Audio: flac, 24000 Hz, mono, s16 Stream mapping: Stream #0:0 -> #0:0 (flac (native) -> flac (native)) Press [q] to stop, [?] for help Output #0, flac, to ‘/Users/drew/ebook2audiobook/tmp/ebook-2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa/8ab98550466678b3f8827262be2e0235/chapters/chapter_1.flac’: Metadata: encoder : Lavf61.7.100 Stream #0:0: Audio: flac, 24000 Hz, mono, s16, 128 kb/s Metadata: encoder : Lavc61.19.101 flac [out#0/flac @ 0x6000021fc000] video:0KiB audio:625KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 1.294253% size= 633KiB time=00:00:42.18 bitrate= 123.0kbits/s speed=1.53e+03x
********* Combined block audio file saved to /Users/drew/ebook2audiobook/tmp/ebook-2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa/8ab98550466678b3f8827262be2e0235/chapters/chapter_1.flac Combining block 1 to audio, sentence 0 to 4 Converting 80.00%: : 5/5 Input #0, concat, from ‘/Users/drew/ebook2audiobook/tmp/ebook-2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa/8ab98550466678b3f8827262be2e0235/chapters/chapters.txt’: Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Audio: flac, 24000 Hz, mono, s16 Stream mapping: Stream #0:0 -> #0:0 (flac (native) -> flac (native)) Press [q] to stop, [?] for help Output #0, flac, to ‘/Users/drew/ebook2audiobook/tmp/ebook-2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa/8ab98550466678b3f8827262be2e0235/test2.flac’: Metadata: encoder : Lavf61.7.100 Stream #0:0: Audio: flac, 24000 Hz, mono, s16, 128 kb/s Metadata: encoder : Lavc61.19.101 flac [out#0/flac @ 0x600000e14000] video:0KiB audio:625KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 1.294253% size= 633KiB time=00:00:42.18 bitrate= 123.0kbits/s speed=1.8e+03x
********* total audio blocks saved to /Users/drew/ebook2audiobook/tmp/ebook-2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa/8ab98550466678b3f8827262be2e0235/test2.flac Input #0, flac, from ‘/Users/drew/ebook2audiobook/tmp/ebook-2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa/8ab98550466678b3f8827262be2e0235/test2.flac’: Metadata: encoder : Lavf61.7.100 Duration: 00:00:42.18, start: 0.000000, bitrate: 122 kb/s Stream #0:0: Audio: flac, 24000 Hz, mono, s16 Input #1, ffmetadata, from ‘/Users/drew/ebook2audiobook/tmp/ebook-2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa/8ab98550466678b3f8827262be2e0235/metadata.txt’: Metadata: title : test2 publisher : epubBooks Classics year : 2025 Duration: 00:00:42.18, start: 0.000000, bitrate: 0 kb/s Chapters: Chapter #1:0: start 0.000000, end 42.183000 Metadata: title : Part 1 Input #2, image2, from ‘/Users/drew/ebook2audiobook/tmp/ebook-2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa/8ab98550466678b3f8827262be2e0235/test2.jpg’: Duration: 00:00:00.04, start: 0.000000, bitrate: 8934 kb/s Stream #2:0: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 1200x1600 [SAR 96:96 DAR 3:4], 25 fps, 25 tbr, 25 tbn Stream mapping: Stream #0:0 -> #0:0 (flac (native) -> aac (native)) Stream #2:0 -> #0:1 (copy) Press [q] to stop, [?] for help Output #0, mp4, to ‘/Users/drew/ebook2audiobook/audiobooks/gui/host/web-2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa/test2.mp4’: Metadata: title : test2 publisher : epubBooks Classics year : 2025 encoder : Lavf61.7.100 Chapters: Chapter #0:0: start 0.000000, end 42.183000 Metadata: title : Part 1 Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, mono, fltp, 128 kb/s Metadata: encoder : Lavc61.19.101 aac Stream #0:1: Video: mjpeg (Baseline) (mp4v / 0x7634706D), yuvj420p(pc, bt470bg/unknown/unknown), 1200x1600 [SAR 96:96 DAR 3:4], q=2-31, 25 fps, 25 tbr, 12800 tbn (attached pic) [mp4 @ 0x138707c00] Starting second pass: moving the moov atom to the beginning of the file [out#0/mp4 @ 0x6000036640c0] video:44KiB audio:641KiB subtitle:0KiB other streams:0KiB global headers:0KiB muxing overhead: 1.251900% frame= 1 fps=1.0 q=-1.0 Lsize= 693KiB time=00:00:00.04 bitrate=141990.4kbits/s speed=0.0394x
[aac @ 0x138708bc0] Qavg: 13314.573
*********** Session: 2f1eea04-fee3-42f5-8a02-d87dc3f6c6fa ************** Store it in case of interruption, crash, reuse of custom model or custom voice, you can resume the conversion with --session option