Comments (8)
It seems the issue was related to multiprocessing. I tried encapsulating the main code in train.py by defining it within a def main(): and it worked.
here is an example:
import os
from trainer import Trainer, TrainerArgs
from TTS.tts.configs.glow_tts_config import GlowTTSConfig
from TTS.tts.configs.shared_configs import BaseDatasetConfig
from TTS.tts.datasets import load_tts_samples
from TTS.tts.models.glow_tts import GlowTTS
from TTS.tts.utils.text.tokenizer import TTSTokenizer
from TTS.utils.audio import AudioProcessor
def main():
output_path = os.path.dirname(os.path.abspath(__file__))
dataset_config = BaseDatasetConfig(
formatter="ipa_format",
path="E://model//DATASET//viet-tts",
meta_file_train="E://model//DATASET//viet-tts//meta_data.tsv",
)
config = GlowTTSConfig(
# Configuration parameters
)
ap = AudioProcessor.init_from_config(config)
tokenizer, config = TTSTokenizer.init_from_config(config)
train_samples, eval_samples = load_tts_samples(
# Loading samples parameters
)
model = GlowTTS(config, ap, tokenizer, speaker_manager=None)
trainer = Trainer(
TrainerArgs(), config, output_path, model=model, train_samples=train_samples, eval_samples=eval_samples
)
trainer.fit()
if __name__ == '__main__':
main()
from tts.
AssertionError: ❗ len(DataLoader) returns 0. Make sure your dataset is not empty or len(dataset) > 0.
Validate your custom formatter works correctly.
from tts.
@lexkoro the formatter works correctly i guess. When i print the training samples and evaluation samples I obtain the following result:
from tts.
@aryamanstha Why do the audio_files have no extension?
from tts.
@aryamanstha Why do the audio_files have no extension?
The formatter doesn't place the extension in the audio_file name. However all the audio files have .wav extension.
from tts.
same issue : During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\AZPC\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 122, in spawn_main
exitcode = _main(fd, parent_sentinel)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AZPC\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 131, in _main
prepare(preparation_data)
File "C:\Users\AZPC\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 244, in prepare
_fixup_main_from_name(data['init_main_from_name'])
File "C:\Users\AZPC\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 268, in _fixup_main_from_name
main_content = runpy.run_module(mod_name,
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 226, in run_module
File "", line 98, in _run_module_code
File "", line 88, in _run_code
File "E:\TTS\TTS\recipes\ljspeech\glow_tts\train_glowtts.py", line 90, in
trainer.fit()
File "C:\Users\AZPC\AppData\Local\Programs\Python\Python311\Lib\site-packages\trainer\trainer.py", line 1860, in fit
remove_experiment_folder(self.output_path)
File "C:\Users\AZPC\AppData\Local\Programs\Python\Python311\Lib\site-packages\trainer\generic_utils.py", line 77, in remove_experiment_folder
fs.rm(experiment_path, recursive=True)
File "C:\Users\AZPC\AppData\Local\Programs\Python\Python311\Lib\site-packages\fsspec\implementations\local.py", line 185, in rm
shutil.rmtree(p)
File "C:\Users\AZPC\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 787, in rmtree
return _rmtree_unsafe(path, onerror)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AZPC\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 634, in _rmtree_unsafe
onerror(os.unlink, fullname, sys.exc_info())
File "C:\Users\AZPC\AppData\Local\Programs\Python\Python311\Lib\shutil.py", line 632, in _rmtree_unsafe
os.unlink(fullname)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'E:/TTS/TTS/recipes/ljspeech/glow_tts/run-April-03-2024_07+09PM-dbf1a08a\trainer_0_log.txt'
from tts.
yep, i have the same issue, though on windows it's WinError 32, while on mac it gives AssertionError as in OP's traceback, before permission error
from tts.
I have tried every possible way, it feels like a train code is creating a folder containing log files, and it cannot be changed, related to TensorBoard
from tts.
Related Issues (20)
- [Feature request] GPU Mac Silicon Chip HOT 1
- [Bug] Error during installation on Mac HOT 1
- [Bug] YourTTS alignment is weird
- [Bug] XTTS Finetuning - xtts_demo.py - Collab HOT 1
- [Feature request] Website Improvements
- [Train XTTSv2 hifigan decoder] Provide script
- [Bug] xtts_v2, AttributeError: 'TTS' object has no attribute 'speakers' HOT 3
- Hello, Please add bengali language cloning [Feature request]
- UnboundLocalError: local variable 'dataset' referenced before assignment [Bug] HOT 3
- [Bug] Anyway to run this as docker-compose ? HOT 2
- [Bug] DDP not actually working HOT 1
- [Bug] 'tts_models/ben/fairseq/vits' model didn't found Character 'য়' not found in the vocabulary.
- [Bug] Anyway to run this as docker-compose ? HOT 2
- [Bug] ValueError: Can't infer missing attention mask on `mps` device. Please provide an `attention_mask` or use a different device. HOT 5
- Add Support for laughter annotation in Fine-Tuning with a special token [Feature request]
- [Feature request] pronounciation, cadence and nuances in XTTS v2... HOT 1
- [Bug] Armenian Language model training fail HOT 3
- [Feature request] is it possible to initialize speaker_wav 1 time?
- Error: Could not install packages due to an OSError [Bug] HOT 5
- [Bug] Hoarseness in Higher-Pitched Female Voices with xtts-v2 after finetune HOT 1
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 tts.