Giter Club home page Giter Club logo

Comments (5)

JonLaliberte avatar JonLaliberte commented on July 28, 2024

Wanted to note here that I tried using the Nabu Casa TTS with Chime TTS here, but got an error (this is probably why nothing played):


Logger: custom_components.chime_tts
Source: custom_components/chime_tts/__init__.py:122
Integration: Chime TTS (documentation, issues)
First occurred: 8:59:25 AM (2 occurrences)
Last logged: 8:59:25 AM

- Error calling tts.media_source.generate_media_source_id: Invalid TTS provider selected
Unable to generate TTS audio

Here is the YAML for the call:

service: chime_tts.say
data:
  delay: 450
  final_delay: 0
  tts_playback_speed: 100
  tts_platform: cloud_say
  message: This is a test
  volume_level: 0.25
  language: en
  tld: com
  chime_path: custom_components/chime_tts/mp3s/bells.mp3
target:
  entity_id: media_player.office

After this I tried turned on debug logging and tried using Google Translate and nothing seems to happen when I call the service. I don't see anything logged, and nothing changes with the device.
The UI in the Call Services interface updates to show a checkmark on the "Call Service" button which indicates that the service call succeeded.

from chime_tts.

JonLaliberte avatar JonLaliberte commented on July 28, 2024

Ok. I was playing with this again just now targeting a different HomePod (and UniFi doorbell) and it was working great.
I added the office HomePod to it again this time it worked!

I noticed that I do need to select Entities, that if I try selecting Devices it will fail.

I'm wondering if something is up with the HomePod (via AppleTV integration) where if there is currently a stream (AirPlay from Mac in this case), that it causes problems taking it over.

from chime_tts.

nimroddolev avatar nimroddolev commented on July 28, 2024

I think the issue with the volume being changed too early actually has to do with a delay that happens between initiating playback on the HomePod Mini, to when it actually starts playing.

More specifically: The volume_set service is called on the HomePod right before the play_media service (which has the delay), so the volume is changed but then there's a delay from when the HomePod prepares to play the audio to when the audio is played.

I think this delay is likely asynchronous and likely to be different each time the HomePod Mini plays Chime TTS audio (or any other audio from Home Assistant). I don't receive any feedback telling me when the audio actually starts playing so I can't know when to change the volume so it coincides with the start of playback.

I don't think I can fix this issue as it looks like a hardware limitation for how the HomePod streams audio from Home Assistant. Unfortunately I can currently only come up with a compromise solution of

  1. Pausing any current media on the HomePod Mini
  2. Adjusting the volume
  3. Playing the Chime TTS audio
  4. Restoring the volume

I am not sure I can then resume the previously playing audio. I need to look into it further. I'll post an update here once I know more.

from chime_tts.

JonLaliberte avatar JonLaliberte commented on July 28, 2024

Yeah, what I've done in my current automations is basically what you've described.
It's not the best solution, but given the options currently provided I think it's the only way.

from chime_tts.

nimroddolev avatar nimroddolev commented on July 28, 2024

The issue raised is not caused by this integration and cannot be fixed by it. A solution was proposed and accepted as the best option to deal with the issue.

from chime_tts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.