[APP][Pro] Google Services - App for Translate and new Text-to-Speech for any device with url input

I did some testing, streaming the wav url from chrome to google nest audio works (didn’t noticed this option before). Soundboard app can play wav files on homey speaker, but there is nog soundboard play card in google chromecast app from athom only a lot of streaming option for tunein station/ internet radio and the sound URL I use at the moment.

make a non cloud device and 2 flows. one for sending text to url and one for non cloud device to for example chromecast audio URL THEN card. Setup page is not used for this non cloud option
Schermafbeelding 2022-10-28 om 16.02.28

2 Likes

It’s another device you can create.

Does the url come from the google service app?

I’m not sure: what did go wrong then? What did you use before?

Yes the URL is coming from your app and is casted to chromecast livingroom and a logic to get the url for testing in browser you asked me. But did only listen to the link on PC speakers, now I noticed that I can also stream from browser to chromecast. Thats the difference in testing before.

So now I know the link your app creates is working to chromecast from browser, but not via the chromecast homey app. I hear pling for connection, but after this no audio.

Setting your app to MP3 it works via the chromecast homey app. So maybe there sits the problem?

Schermafbeelding 2022-10-28 om 16.06.08

Not if my URL works on your livingroom, imho.
Because, just like with Sonos, the only work if i give the right extention and filetype with.
And it does that correctly (if i send a .wav to sonos but the filetype is audio/mpeg, it will not work correct on Sonos).

Perhaps the Chromecast app does not send a wav url through correctly?
I don’t know, just speculating.

I think thats the problem indeed about the filetype chromecast app is sending, will contact athom about there app, thanks for helping. Your part is working nicely !

1 Like

I know they do have the mapping in the Soundboard app (old version already btw):

const TYPES_MAP = {
  'audio/wav': 'wav',
  'audio/x-wav': 'wav',
  'audio/mp3': 'mp3',
  'audio/mpeg': 'mp3',
};

And they even have build a migration for it to work correctly with Sonos :

/*
 Add file extension to paths, to serve the correct Content-Type for e.g. Sonos integration
*/
	async _migration1() { ... }

Oke so they maybe needs to do that also for the chromecast app as well. Athom apps are not opensource I think I red somewhere so we can’t look in the code I guess?

Not there “official device apps” no, only there apparently never-formally-supported-apps like Soundboard and HomeyScript are opensource :wink:

Hi Arie,

When I send 2 speech trigger at the same time to an URL only one gets send. The default homey speech card has some kind of cue it looks like and is doing both after each other.

Can you make this also for this app?

Schermafbeelding 2022-10-30 om 15.45.03
Schermafbeelding 2022-10-30 om 15.46.38

Hey Robinjo, i will not implement this in the Google Service itself, mainly because the issue is not with GS itself, but the playing-device not handeling queue. I could build in a queue, but then there comes a lott more questions like, priority and cancel queue items, etc.

Also, i already have the solution for you in another App of mine: Advanced Triggers App voor Homey | Homey
You can put the Trigger to seqentual, and let this trigger/flow send the Url to the device and wait to finish (or use the duration token and pass it along as argument).
Each triggered flow will be put in the queue, and this works for anything, not just Google Services.

Perhaps i could make Advanced Triggers easier to use for this, just let me what would be easier in AT.

Thanks Arie,

This is what I was looking for. Will move to AT post for questions about that app related.

Can someone help me with some example, when I would like to send as part of flows, audio/speech to different Google Chromecast devices ? I got it working for one, two smart speakers in parallel…but if I have one flow saying something just on one of the speaker, and other flow speaking on other speaker, sometime some flows speaking on both, sometimes on all (eg. Alarm)… how I can achieve that ?

Also is there any particular reason for example why it’s not possible just to use “Start saying” via configured device, like in case of Google TTS ? (just asking, probably there is good reason :wink: ) Thank you.

Is this a question for Google Services?
I don’t have any real devices?
And the devices that i/Google services do have has a Start saying card.

So i might be missing something?

1 Like

Yep

obrazek

They do, for that particular device above and I need to use URL Triggered condition, otherwise how can I send the URL to Chromecast … or did I completely misunderstood the concept ? :wink:

Ah, i see.
But how would you want it then: The google TTS device connected to a real device somehow?

Like the Google Cloud TTS Device linked with particular Chromecast device… otherwise I don’t know how I can easily achieve the case I have described above. (or I missed the concept) .

Basically that is what I’m using today :
obrazek

Actually, the best way to achive what you want, is to create a TTS device for each output/speaker. It is ment this way also, because you need to configure the TTS device per speaker for the best quality.

And then you can just trigger the TTS device for the room you are in for instance.

Here, follow this current topic
Google Services TTS in Advanced Flow - Flows - Homey Community Forum

1 Like

I must be missing something simple, every time I attempt to use Cloud TTS Service I get an error card “Did you configure the JSON and voices in the settings page”…as far as I can tell, yes I did. I set upi the cloud platform, got the JSON and copied the entire downloaded text into the app

The requests are showing up in Google