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

LookupError when executing demo_part3.ipynb #369

Open
quantum304 opened this issue Mar 7, 2025 · 2 comments
Open

LookupError when executing demo_part3.ipynb #369

quantum304 opened this issue Mar 7, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@quantum304
Copy link

When I try to execute demo_part3.ipynb I encouter the following error :

LookupError Traceback (most recent call last)
Cell In[18], line 28
25 speaker_key = speaker_key.lower().replace('', '-')
27 source_se = torch.load(f'C:/Users/me/Desktop/OV/openvoice/checkpoints/base_speakers/ses/{speaker_key}.pth', map_location=device)
---> 28 model.tts_to_file(text, speaker_id, src_path, speed=speed)
29 save_path = f'{output_dir}/output_v2
{speaker_key}.wav'
31 # Run the tone color converter

File c:\Users\me\Desktop\OV.venv\lib\site-packages\melo\api.py:100, in TTS.tts_to_file(self, text, speaker_id, output_path, sdp_ratio, noise_scale, noise_scale_w, speed, pbar, format, position, quiet)
98 t = re.sub(r'([a-z])([A-Z])', r'\1 \2', t)
99 device = self.device
--> 100 bert, ja_bert, phones, tones, lang_ids = utils.get_text_for_tts_infer(t, language, self.hps, device, self.symbol_to_id)
101 with torch.no_grad():
102 x_tst = phones.to(device).unsqueeze(0)

File c:\Users\me\Desktop\OV.venv\lib\site-packages\melo\utils.py:23, in get_text_for_tts_infer(text, language_str, hps, device, symbol_to_id)
22 def get_text_for_tts_infer(text, language_str, hps, device, symbol_to_id=None):
---> 23 norm_text, phone, tone, word2ph = clean_text(text, language_str)
24 phone, tone, language = cleaned_text_to_sequence(phone, tone, language_str, symbol_to_id)
26 if hps.data.add_blank:

File c:\Users\me\Desktop\OV.venv\lib\site-packages\melo\text\cleaner.py:12, in clean_text(text, language)
10 language_module = language_module_map[language]
11 norm_text = language_module.text_normalize(text)
...
- 'C:\nltk_data'
- 'D:\nltk_data'
- 'E:\nltk_data'

How to resolve it ?

@dosubot dosubot bot added the bug Something isn't working label Mar 7, 2025
@quantum304
Copy link
Author

I have added the following lines at the top of the file but still have the same error...
import nltk
nltk.download('averaged_perceptron_tagger')
nltk.download('punkt')
nltk.download('popular')

@Jalaj-Kumar-001
Copy link

I am also getting same error

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