Skip to content

[BUG] Cannot add custom voices #5

@wookash

Description

@wookash

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I'm adding new voice onnx and relevant onnx.json files to the config folder, I'm updating voices.json, the voice can be chosen in home assistant but there is error (see below)

Expected Behavior

I'd like to be able to add custom voice

Steps To Reproduce

copy voice files to config directory
update voices.json file
reload wyoming integration in home assistant
choose new voice in assistant
click play to try the new voice
error occurs

Environment

- OS: debian 12
- How docker service was installed: portainer

CPU architecture

x86-64

Docker creation

services:
  piper:
    image: lscr.io/linuxserver/piper:latest
    container_name: piper
    environment:
      - PUID=xx
      - PGID=xx
      - TZ=xxx/xxx
      - PIPER_VOICE=en_US-lessac-high
      - PIPER_LENGTH=1.0 #optional
      - PIPER_NOISE=0.667 #optional
      - PIPER_NOISEW=0.333 #optional
      - PIPER_SPEAKER=0 #optional
      - PIPER_PROCS=1 #optional
    volumes:
      - /xxxx:/config
    ports:
      - 10200:10200
    restart: unless-stopped

Container logs

ERROR:asyncio:Task exception was never retrieved

future: <Task finished name='Task-9' coro=<AsyncEventHandler.run() done, defined at /lsiopy/lib/python3.12/site-packages/wyoming/server.py:28> exception=VoiceNotFoundError('jarvis')>

Traceback (most recent call last):

  File "/lsiopy/lib/python3.12/site-packages/wyoming/server.py", line 35, in run

    if not (await self.handle_event(event)):

            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/lsiopy/lib/python3.12/site-packages/wyoming_piper/handler.py", line 73, in handle_event

    piper_proc = await self.process_manager.get_process(voice_name=voice_name)

                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/lsiopy/lib/python3.12/site-packages/wyoming_piper/process.py", line 114, in get_process

    ensure_voice_exists(

  File "/lsiopy/lib/python3.12/site-packages/wyoming_piper/download.py", line 77, in ensure_voice_exists

    find_voice(name, data_dirs)

  File "/lsiopy/lib/python3.12/site-packages/wyoming_piper/download.py", line 183, in find_voice

    raise VoiceNotFoundError(name)

wyoming_piper.download.VoiceNotFoundError: jarvis

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions