简体   繁体   中英

google home reading from website

I'm currently working on a project where my main focus is to create an Action for Google Home which can be invoked and asked to read out some articles (chosen previously from a list, also by voice) from a particular website. I was wondering if it was possible, or if it were already some similar projects.

What I'd like to do is something like the feature in Pocket or instapaper, where you can make the device read the article for you.

I also thought to make something like a database with all the articles I'm interested in, which auto-updates itself whenever a new article is posted, but my main concern now is to be able to separate the articles in various lists, parse the article and in the end implement text to speech into the Action.

Also some implementations with 3rd party services and apps would be useful.

Please ask me if anything isn't exactly clear, english is not my first language.

Yes, this is possible. Not necessarily easy, but possible.

First - there is nothing in the Actions on Google library or in Google Home that will automatically scrape a website. That will be up to you.

Second - Responses from your Action are limited in how much they can send at a time.

If you're having it do text-to-speech , you're limited to two "text bubbles" of 640 characters each before the user has to reply. You should keep well below that and should probably stick to just one "text bubble".

If you're playing an audio cut , then you're limited to two minutes.

You can work around both of these limitations by using the Media Response . With TTS, you would play a portion of the text, a brief Media response, at the conclusion of which, your server would be triggered to send the next chunk of text. If it is all recorded, you can just send the longer audio as the Media.

Be advised, however, that if you're using the inline editor or using Firebase Cloud Functions (which the inline editor uses), that by default you're not able to access most sites outside Google's network. You need to upgrade to a paid plan to do so. I suggest the Blaze plan which is pay-as-you-go, but includes a free tier which is typically good enough for development work and light production usage.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM