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] I get error message "KeyError: 'en-us'" when I use "CoquiTTS()" #99

Closed
cahya-wirawan opened this issue Feb 20, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@cahya-wirawan
Copy link

cahya-wirawan commented Feb 20, 2023

Description

Hi,
I get error message KeyError: 'en-us' when I use "CoquiTTS()"

from neon_tts_plugin_coqui import CoquiTTS
coquiTTS = CoquiTTS()

The error message is:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/site-packages/neon_tts_plugin_coqui/__init__.py", line 69, in __init__
    self._init_model({"lang": lang})
  File "/usr/local/lib/python3.9/site-packages/neon_tts_plugin_coqui/__init__.py", line 188, in _init_model
    synt = self._init_synthesizer(lang)
  File "/usr/local/lib/python3.9/site-packages/neon_tts_plugin_coqui/__init__.py", line 240, in _init_synthesizer
    synt = importer.load_pickle("tts_models", "model")
  File "/usr/local/lib/python3.9/site-packages/torch/package/package_importer.py", line 256, in load_pickle
    result = unpickler.load()
  File "/usr/local/lib/python3.9/pickle.py", line 1212, in load
    dispatch[key[0]](self)
  File "/usr/local/lib/python3.9/pickle.py", line 1528, in load_global
    klass = self.find_class(module, name)
  File "/usr/local/lib/python3.9/site-packages/torch/package/_package_unpickler.py", line 25, in find_class
    mod = self._importer.import_module(module)
  File "/usr/local/lib/python3.9/site-packages/torch/package/package_importer.py", line 134, in import_module
    return self._gcd_import(name)
...
  File "/usr/local/lib/python3.9/site-packages/torch/package/package_importer.py", line 431, in _find_and_load
    return self._do_find_and_load(name)
  File "/usr/local/lib/python3.9/site-packages/torch/package/package_importer.py", line 421, in _do_find_and_load
    module = self._load_module(name, parent)
  File "/usr/local/lib/python3.9/site-packages/torch/package/package_importer.py", line 371, in _load_module
    return self._make_module(name, cur.source_file, isinstance(cur, _PackageNode), parent)  # type: ignore[attr-defined]
  File "/usr/local/lib/python3.9/site-packages/torch/package/package_importer.py", line 354, in _make_module
    exec(code, ns)
  File "<torch_package_8>.TTS/tts/utils/text/phonemizers/__init__.py", line 20, in <module>
KeyError: 'en-us'

Steps to Reproduce

from neon_tts_plugin_coqui import CoquiTTS
coquiTTS = CoquiTTS()

Relevant Code

No response

Other Notes

Version:
neon-tts-plugin-coqui 0.7.2
No response

@cahya-wirawan cahya-wirawan added the bug Something isn't working label Feb 20, 2023
@NeonBohdan
Copy link
Collaborator

See here what lang codes coqui tts have
Try use en instead of en-us

@cahya-wirawan
Copy link
Author

Hi @NeonBohdan
Thanks for the info. It seems I just forget to install espeak-ng. CoquiTTS() works after I install it.

@github-actions github-actions bot mentioned this issue Feb 23, 2024
NeonDaniel added a commit that referenced this issue Feb 23, 2024
# Changelog

##
[0.7.3a7](https://github.com/NeonGeckoCom/neon-tts-plugin-coqui/tree/0.7.3a7)
(2024-02-23)

[Full
Changelog](0.7.3a6...0.7.3a7)

**Merged pull requests:**

- Update Gradio Web UI
[\#114](#114)
([NeonDaniel](https://github.com/NeonDaniel))

##
[0.7.3a6](https://github.com/NeonGeckoCom/neon-tts-plugin-coqui/tree/0.7.3a6)
(2024-02-23)

[Full
Changelog](0.7.3a5...0.7.3a6)

**Merged pull requests:**

- Pin ovos-tts-server version for stable container release
[\#113](#113)
([NeonDaniel](https://github.com/NeonDaniel))

##
[0.7.3a5](https://github.com/NeonGeckoCom/neon-tts-plugin-coqui/tree/0.7.3a5)
(2024-02-23)

[Full
Changelog](0.7.2...0.7.3a5)

**Implemented enhancements:**

- \[FEAT\] Python3.11-Compatible PyTorch
[\#109](#109)

**Fixed bugs:**

- \[BUG\] I get error message "KeyError: 'en-us'" when I use
"CoquiTTS\(\)"
[\#99](#99)
- Torch Compatibility
[\#82](#82)

**Closed issues:**

- Tried to install Neon tts on Windows 11 using docker commands in
PowerShell
[\#105](#105)
- "TypeError: NoneType object is not callable" when starting
ovos-tts-server
[\#88](#88)

**Merged pull requests:**

- Update automation to publish GH prereleases
[\#112](#112)
([NeonDaniel](https://github.com/NeonDaniel))
- Fix relative paths in setup.py
[\#111](#111)
([NeonDaniel](https://github.com/NeonDaniel))
- Loosen dependency for Python 3.11 Compat.
[\#110](#110)
([NeonDaniel](https://github.com/NeonDaniel))
- Handle connection errors and fall back to local cached model files
[\#108](#108)
([NeonDaniel](https://github.com/NeonDaniel))
- Update release automation to new workflow
[\#104](#104)
([NeonDaniel](https://github.com/NeonDaniel))
- Update Docker to include Gradio web UI
[\#102](#102)
([NeonDaniel](https://github.com/NeonDaniel))



\* *This Changelog was automatically generated by
[github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
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