OpenVoiceOS / ovos-tts-plugin-piper

Apache License 2.0
13 stars 9 forks source link

TypeError: 'NoneType' object is not callable #14

Closed goldyfruit closed 7 months ago

goldyfruit commented 1 year ago
ovos@0df168a4115f:~$ ovos-tts-server --engine ovos-tts-plugin-piper
2023-06-16 14:01:40.379 - OVOS - ovos_plugin_manager.utils:load_plugin:146 - WARNING - Could not find the plugin PluginTypes.TTS.ovos-tts-plugin-piper
Traceback (most recent call last):
  File "/home/ovos/.venv/bin/ovos-tts-server", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_tts_server/__main__.py", line 44, in main
    server, engine = start_tts_server(args.engine, cache=bool(args.cache))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ovos/.venv/lib/python3.11/site-packages/ovos_tts_server/__init__.py", line 44, in start_tts_server
    TTS = engine(config={"persist_cache": cache})  # this will cache every synth even across reboots
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not callable

The configuration file:

  "tts": {
    "module": "ovos-tts-plugin-piper",
    "ovos-tts-plugin-piper": {
      "model": "https://github.com/rhasspy/piper/releases/download/v0.0.2/voice-en-us-danny-low.tar.gz"
    }
  }
JarbasAl commented 1 year ago

this means the plugin is not loading, failing on import (hence plugin class is None), some missing dependency probably

NeonDaniel commented 8 months ago

Just tested this and it looks like the plugin is missing onnxruntime and espeak_phonemizer dependencies:

(venv) d_mcknight@NGI-Cyberpower:~/PycharmProjects/_.ovos$ ovos-tts-server --engine ovos-tts-plugin-piper
2023-10-26 15:44:56.851 - OVOS - ovos_plugin_manager.utils:find_plugins:118 - ERROR - Failed to load plugin entry point EntryPoint(name='ovos-tts-plugin-piper', value='ovos_tts_plugin_piper:PiperTTSPlugin', group='mycroft.plugin.tts'): No module named 'onnxruntime'
Traceback (most recent call last):
  File "/home/d_mcknight/PycharmProjects/_.ovos/venv/bin/ovos-tts-server", line 8, in <module>
    sys.exit(main())
  File "/home/d_mcknight/PycharmProjects/_.ovos/venv/lib/python3.10/site-packages/ovos_tts_server/__main__.py", line 44, in main
    server, engine = start_tts_server(args.engine, cache=bool(args.cache),
  File "/home/d_mcknight/PycharmProjects/_.ovos/venv/lib/python3.10/site-packages/ovos_tts_server/__init__.py", line 51, in start_tts_server
    TTS = engine(config=config)
TypeError: 'NoneType' object is not callable

After manually installing those dependencies this seems to work:

(venv) d_mcknight@NGI-Cyberpower:~/PycharmProjects/_.ovos$ ovos-tts-server --engine ovos-tts-plugin-piper
Could not import the PyAudio C module '_portaudio'.
2023-10-26 15:48:01.751 - OVOS - ovos_tts_plugin_piper:__init__:146 - INFO - downloading piper model: https://github.com/rhasspy/piper/releases/download/v0.0.2/voice-en-us-amy-low.tar.gz
2023-10-26 15:48:04.307 - OVOS - ovos_tts_server.__main__:main:46 - INFO - Server Started
INFO:     Started server process [525157]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:9666 (Press CTRL+C to quit)