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

Use Piper (local TTS) with media player #761

Open
kksligh opened this issue May 11, 2023 · 6 comments
Open

Use Piper (local TTS) with media player #761

kksligh opened this issue May 11, 2023 · 6 comments

Comments

@kksligh
Copy link

kksligh commented May 11, 2023

Can you please add the ability to use the new local TTS service Piper? If there's a way to do this now, please let me know. I've tried playing with the yaml with no luck

@relaystar
Copy link

I'm in a similar situation. FWIW this is what I've tried which seems to match the documentation best:

type: custom:mini-media-player
entity: media_player.m5_atom_echo_1
tts:
  platform: service
  data:
    service: tts.piper
    service_data:
      cache: false
      media_player_entity_id: media_player.m5_atom_echo_1
    message_field: text

This results in a:

"failed to call service tts/piper. service not found"

NB, the following code works find in a script

service: tts.speak
data:
  cache: false
  media_player_entity_id: media_player.m5_atom_echo_1
  message: This is some test text for piper
target:
  entity_id: tts.piper

@Burnarz
Copy link

Burnarz commented Aug 31, 2023

Same here,
@relaystar could you please share, the whole part?
Can't get it working, i need the message field- entry
My code for now (not working)

    tts:
      platform: service
      service: tts.speak
      data:
        cache: false
        media_player_entity_id: media_player.ytube_music_player
        message_field: Text...
      target:
        entity_id: tts.piper

Would be great to have Piper TTS integrated 😃

@MetroAffe
Copy link

Try this:

      platform: service
      data:
        service: tts.speak
        service_data:
          media_player_entity_id: YOURMEDIAPLAYER
        message_field: message
        entity_id: tts.piper

Please close. Already working. Already implemented. No issue.
Love me ❤️

@dougmaitelli
Copy link

I don't think this issue should be closed. Just because it works with the service approach doesn't mean this is not a workaround. The tts.speak is the new standard HA is using for TTS going forward and this card needs to be updated to use that by default, if not it will just end breaking again when old services get deprecated / removed.

@MetroAffe
Copy link

OK. But then this is not an issue. Just a suggestion for improvement.
And I would not say that THIS is a workaround. Its a completely implemented function to use services…
And on top of that I also don’t think that HA will remove the tts services!! Never!

@dougmaitelli
Copy link

@MetroAffe, it might not be an issue yet, but it will be when they get removed. About your mention about HA removing the TTS services, I am not saying they will remove the TTS services, I am saying that this card does not use the new TTS service tts.speak, and instead uses the old tts.*_say which will likely be removed since they are already marked as "Legacy" in the docs: https://www.home-assistant.io/integrations/tts/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants