twilio play mp3 to caller - audio

I have recorded a mp3 audiofile. I want to play it to the caller. I do not have a server or so from where twilio could access the mp3 file.
What is the easiest way to play that mp3 file to the caller? (Subquestions: where can I upload it for twilio? how do I access the file?)
I have read the posts and https://www.twilio.com/docs/api/twiml/play et cetera so I guess I just need to play the audio file for the caller using these few lines of TwiML, replacing the URL:
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Play loop="10">https://api.twilio.com/cowbell.mp3</Play>
</Response>
Since I am an absolute beginner simplicity is key. Thank you so much in advance!

You have to store your mp3 on server and access it via a url. If you don't have your own server , your best bet will be to signup for amazon s3 or google cloud storage and store the mp3 there. Then make the url to access it public and use it in your TwiML.

Related

Use Google Cloud Storage to Host Audio Files for Streaming but not Downloading

I have a bunch of audio files that I want people to be able to listen to. My website has an audio player so that people can listen to them. My audio player looks something like this (though this is simplified):
<audio>
<source src="https://storage.googleapis.com/my-bucket/my-file.mp3">
</audio>
The problem is that it would take almost no work for someone to just grab all of those MP3 urls and download the files.
Is there a way that I can make it so that it's only accessible for streaming, but not for downloading?
How do sites like SoundCloud handle this problem?
For example, SoundCloud lets you play people's songs. However, when I look in Firefox's Network tab I see that when playing a single song it's sending many requests to different MP3 files such as:
/media/3831430/3943025/c9OpfFFp3iYQ.128.mp3
/media/3192789/3352448/c9OpfFFp3iYQ.128.mp3
/media/3033128/3192788/c9OpfFFp3iYQ.128.mp3
Does anyone know what type of system they have going on there? Is this a common anti-piracy pattern for MP3 files that I could, perhaps, implement?
I was hit by the same problem, and I secured my storage bucket from the world by creating a middleware/pass-through service. Now this service has token validation of header and thus wont let your stream until you are authenticated. I used node pipe to achieve this, I hope this help. Here is sample code in js.
const http = require('http');
http.createServer(function(request, response) {
require('request')
.get("https://gcpmusicbucket.com/mp3/My-Song-1.mp3")
.pipe(response);
})
.listen(3000)

how to host mp3 file with koa framework

I'm coding API server to be used in mp3 app.
I've used koa-send, koa-static, and just setting mp3 file to response-body.
But, no matter what API the app uses, the app stops. When I sent the length of the MP3 file separately because the app did not seem to accept the length of the MP3 file, it worked on iOS but not on Android.
If I post the same MP3 file on S3 and send request to that URL, it worked well, so I can't understand what the problem is.
Also, if I play music on Safari using my API, it comes out as a live broadcast. (using other sites, it comes in the form of mp3)
If it's a problem that you don't know how long it's playing, why is it the same file, but not on other sites, and not on my API?
Other storage site:
My API:

My base64 audio file is not the same as the one google cloud speech send

I want to translate an audio file to text via google google cloud speech api.
I record an audio file of type :
audio/x-flac type with codecs=opus.
My audio file transcribed to base64 gives this (I only put the beginning):
GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQRChYECGFOAZwH/////////FUmpZpkq17GDD0JATYCGQ2hyb21lV0GGQ2hyb21lFlSua7+uvdeBAXPFh6ZbkBme7LiDgQKGhkFfT1BVU2Oik09wdXNIZWFkAQEAAIC7AAAAAADhjbWERzuAAJ+BAWJkgSAfQ7Z1Af/////////ngQCjjIEAAID7A//+//7//qOMgQA7gPsD//7//v/+o4yBAHeA+wP//v/+//6jjIEAs4D7A//+//7//qOMgQDvgPsD//7//v/+o4yBASuA+wP//v/+//6jQOmBAWiA+4MCAv/+//5+Gjf43iuAMUp0LKWeBuKWw5OP5gEM9j8POpNh6x2zmKmvvjYztj563NneRFMpQuTaVo6Zmkee3gftByFW4mgqYrsH4JQBFm3muCMtGwBRKxLBqdm0Sz3VOaS5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcBGsaNXRSQmfKpNmHAEaVZ120Ho0faji/1DFqduipx5F9Kj2eUmcLGdgvb0QKsY2vitpqZ32XiZ4r4t75RKoMSlBsSKMP5ZjnbOvhJtib9B0b/FLyiGoQQIMEfCOYO2Db+AFUP6AxoUqNBqIEBo4D7g4qXYizKyF771oN3hbF/FQwqgbt5cnU1Aev4S9h0wbwTJuNCyd4PnjBBo2hvEEx29FIzFZZd7AUIhGG/f9YS5C+wIdnjl6i6EsufNN/eETxOZZqSheXcLLzn9G+TO4EeLIodZiZoxAYCF/pud8orEKG24zWYi6bNcg+moXt8/rpXbaLkqJeIoGzQRPFkd738ClvMW+yNUDmuKY1xmXdvtj4XoPwEdVtZHPxa6tABIZEWobIxh5CdCY495Ij9mqi1jFsnHLiYNP48NzvnoCfbAh/a3M13Mijct5n4+zGskka3y4WVAwYvQixFBQkhX1SyH5BcW1d8dvHv8lPxshJ6C9xCKdspDqFeLFrl9IU9y9l9lYF1p7XyZvXfqaz7bzDWV1ZsxhEVMwkVIiyUHch2E+omwR5JjY0+HmiXQAbnzAoP/+AJPZU6tSRENx5y8rRviuK76d/saDudaUZJ/aVG3t6J/kOPKlBg1g5LTr5sXnww/7PqbmH+eGfOBydu4eyfa7jbLmdE6AfYeO3kHs3hn6/nlwDKvYpStvWUHdeRdWe2zdKjQYeBAd+A+4OA
When I use the example of google on this link:
https://cloud.google.com/speech-to-text/
When I upload my audio file and I look the request sent I see that their content is not the same:
UklGRqTjBQBXQVZFZm10IBAAAAABAAEAgLsAAAB3AQACABAAZGF0YYDjBQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
The google example works. Mine doesn't work.
Is the encoding different? if so, what is the encoding?
I use base64.exe for transcribe my audio file to base64.
Thanks
I found the solution.
I was using the js MediaRecorder library to generate my flac audio file but it is not compatible for google cloud speech. When you upload it on the example of google cloud speech it modifies the file to make it compatible.
So I changed the library to generate my file, I used recorder-js.
https://www.npmjs.com/package/recorder-js
It is working now.

Can't seem to find a way to play mp3

I've been hours going around this problem and I still can't solve it. Basically I get data from a database and using google text to speech I transform it into an mp3; after that I upload it to the google cloud storage. From there I use Twilio API to play the mp3 file when making an outbound call; I know I need to have a url for this file but I am very inexperienced in this and when I create a VoiceResponse() I can't input it. I am doing this all through Python. Is it possible for me to play the mp3 in the outbound call?
Best

Nest Camera Video Streaming in VLC player

I have got a public share nest camera address from my friend.
Instead of using a web browser for seeing the video, I want to use a VLC player to video stream. This way allows me to use many other features of VLC to do video analytics on the video.
How to do it?
I was able to do this in these steps:
Go to the public video share URL. It should be something like this:http://video.nest.com/live/pSgnOZ0s4t
If you use developer tool on chrome and see network traffic ....look for a URL with .m3u8 in the end... it will be something like this:https://stream-delta.dropcam.com/nexus_aac/37451e60aeac457f9800704f1662147e/playlist.m3u8
Once you get that open that file in a text editor....you will get something like this inside the file
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=400816,CODECS="avc1.77.31,mp4a.40.2",RESOLUTION=1280x720
chunklist_w391480529.m3u8
The stream URL is then
https://stream-delta.dropcam.com/nexus_aac/37451e60aeac457f9800704f1662047e/chunklist_w391480529.m3u8
Once you have this then install livestreamer to extract video like this:
livestreamer "hls://https://stream-delta.dropcam.com/nexus_aac/37451e60aeac457f9800704f1662047e/chunklist_w391480509.m3u8" best -o nest_video.ts
This will save the file to your disk.
I used this to avoid nest aware subscription. Unfortunately, they charge so much for that service. When someone can just save the video to a disk and upload to a cheap cloud option...
I wrote a page that takes a public Nest video url and returns an HLS media .m3u8 streaming url
get media url for nest/ dropcam cameras

Resources