Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] kss formatter doesn't set the root_path attribute #2156

Closed
github40912 opened this issue Nov 17, 2022 · 1 comment
Closed

[Bug] kss formatter doesn't set the root_path attribute #2156

github40912 opened this issue Nov 17, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@github40912
Copy link

github40912 commented Nov 17, 2022

Describe the bug

https://github.com/coqui-ai/TTS/blob/v0.9.0/TTS/tts/datasets/formatters.py#L602

To Reproduce


KeyError                                  Traceback (most recent call last)
/tmp/ipykernel_23/1931759875.py in <module>
     72     eval_split=True,
     73     eval_split_max_size=config.eval_split_max_size,
---> 74     eval_split_size=config.eval_split_size,
     75 )

/opt/conda/lib/python3.7/site-packages/TTS/tts/datasets/__init__.py in load_tts_samples(datasets, eval_split, formatter, eval_split_max_size, eval_split_size)
    121         assert len(meta_data_train) > 0, f" [!] No training samples found in {root_path}/{meta_file_train}"
    122 
--> 123         meta_data_train = add_extra_keys(meta_data_train, language, dataset_name)
    124 
    125         print(f" | > Found {len(meta_data_train)} files in {Path(root_path).resolve()}")

/opt/conda/lib/python3.7/site-packages/TTS/tts/datasets/__init__.py in add_extra_keys(metadata, language, dataset_name)
     62         item["language"] = language
     63         # add unique audio name
---> 64         relfilepath = os.path.splitext(os.path.relpath(item["audio_file"], item["root_path"]))[0]
     65         audio_unique_name = f"{dataset_name}#{relfilepath}"
     66         item["audio_unique_name"] = audio_unique_name

KeyError: 'root_path'

Expected behavior

No response

Logs

No response

Environment

v0.9.0

Additional context

No response

@github40912 github40912 added the bug Something isn't working label Nov 17, 2022
@github40912 github40912 changed the title [Bug] kss formatter doesn't set the root_path attribute. [Bug] kss formatter doesn't set the root_path attribute Nov 17, 2022
erogol pushed a commit that referenced this issue Dec 12, 2022
quick fix for #2156.
 added 'root_path' key.
@stale
Copy link

stale bot commented Dec 19, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You might also look our discussion channels.

@erogol erogol closed this as completed Dec 19, 2022
shivammehta25 pushed a commit to shivammehta25/TTS that referenced this issue Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants