How to add sound from firebase storage to actions in Google?

To be extremely clear, I want to know how to add sound from the firebase repository to actions on Google? I have been stuck on this issue for several weeks now. I uploaded my sound to the firebase repository, and from it I copied the link provided by Firebase and pasted the audio URL in this format into the speech output. Check how I did this: -

<speak>
<audio src="https://firebasestorage.googleapis.com/v0/b/enrich-58fdf.appspot.com/o/xxx.mp3?alt=media&token=aabcd430-9d46-45f6-ad21-fdca0895123f">
</audio>
</speak>

But that did not work. But a few months ago in the Google+ community, I found a guy who asked a question similar to this question, and Allen Pervenenberg answered, and he said, to add a * * token between and and the token. Therefore, after this, the new code generates ie

<speak>
<audio src="https://firebasestorage.googleapis.com/v0/b/enrich-58fdf.appspot.com/o/xxx.mp3?alt=media&amp;token=aabcd430-9d46-45f6-ad21-fdca0895123f">
</audio>
</speak>

. , SSML , . - ?

+4
3

&, & &.

- , </audio> </speak>. Google , , SSML SSML . SSML SSML , .

SSML Firebase, :

<speak>
<audio src="https://firebasestorage.googleapis.com/v0/b/repeater-96d05.appspot.com/o/digital_watch_alarm_long.ogg?alt=media&amp;token=cdf4d1da-1d1f-42eb-a478-3912275d0f37">
</audio>
text
</speak>
+2

FWIW: , ? Audacity , , AoG:

: MP3 (MPEG v2) 24 . 24K ~ 96K ,

: Opus Ogg 24K () 24K - 96K ,

(): WAV (RIFF) PCM 16-, , 24K

: , . 120 . 5 . URL- HTTPS.

+1

, @matthewayne (, , ), &, XML, &amp;

However - I do not see a problem. I used this exact code in the Dialogflow Text Response area and it works without problems:

<speak><audio src="https://firebasestorage.googleapis.com/v0/b/enrich-58fdf.appspot.com/o/welcome.mp3?alt=media&amp;token=aabcd430-9d46-45f6-ad21-fdca0895123f"></audio></speak>

enter image description here

I also tested this as part of a simple answer parameter via Dialogflow, and it works great.

+1
source

Source: https://habr.com/ru/post/1691605/


All Articles