I'm looking for an example of how to play an audio file during a twilio conference session. I'd like to play the audio file into the conference at the push of a button by one of the participants.
Any ideas?
Here's an article for how to do a roll call during a conference that will give you an idea of how to manage the workflow (you obviously just want the user to hear the played message, and not need to parse the calls):
https://www.twilio.com/blog/2014/09/roll-call-roger-stringer-shows-you-how-to-take-a-headcount-during-a-twilio-conference-call.html
Basically you have the user exit the conference on the keypress, have the message played, then the user rejoin the conference. If you want it to play for all users, it would disrupt the audio of the conference if you need the record feature for it.
Related
i have 2 sonos speaker. I have done an application on dialogflow where i can say "play muse" to listen my mp3 on them. The sentence is send to a php webserver (with a webhook) and the sound is send to the sonos with the api. But, the only solution i have found to identify the source, is to add:
"play muse on the kitchen", or "play muse on the bedroom".
I dont know how to identify the source where the request comes from, and to deliver the sound on the correct speaker.
Have you an idea ?
Consider I want to build a system which plays audio and video
Intents I will have are
Ask user what he/she wants (Audio or video)
Play audio or video depending on previous intent.
I want to reuse the intent 2 (player for audio or video) without having two intents one for each audio and video.
I'm planning my intents and contexts like below
Bot: What you want to play
User: Play me audio
Bot: plays audio (using same player intent)
User: Play me video
Bot: plays video (using same player intent)
Is it possible? if so how do I do it?
The best way to handle this isn't through a different Intent - but rather through Fulfillment.
Intents are for handling what the user says, and not how to respond to what they say. Fulfillment lets you look at parameters that have been set and send an appropriate response.
When I ask help, Alexa help invoke instead not the custom help skill. If the audio player not playing eg. on the launch page I get the custom help invoke, but not in the audio player. How can I override that?
thank you.
Per the AudioPlayer documentation:
When sending a Play directive, you normally set the shouldEndSession flag in the response object to true to end the session.
So once the user has invoked the Play Directive, they are no longer interacting with your skill. The user can effect the playback of content from your skill using the built-in playback control intents, but any other interaction with your skill requires use of the normal invocation phrase - e.g. "Alexa, ask [SkillName] for help"
What about setting shouldEndSession to false?
This has the effect of expecting more user input. While this would allow the user to ask for help (or otherwise interact with you skill) immediately after starting the audio playback, it would also pause the audio playback to listen for this input.
You can't.
In Audio Player skill when skill starts to play audio, then there is no internal session management and you can only respond using AudioPlayer directives like Play Pause Next and some other directives which you can find In this link here.
I want to write a program that writes the music name to a social network status. When changing a track in Spotify, I can get the name of the music, but I don't know how to get a notification when changing music.
How do I get a callback when changing a track in Spotify's API?
You might be able to use the Web Playback SDK with player-state-changed to get these events, but this will depend on what you are going to write your programme in but it might help to look at this and see if it does what you need
I am trying to develop a custom skill which would perform the below operation:
Alexa, launch michael jackson app
Then I would provide option for user to select from the below option:
Alexa, play music on spotify(and I need to internally pass the value of artist (mj))
Alexa, play music on pandora(and I need to internally pass the value of artist (mj))
Alexa, play music on podcast(and I need to internally pass the value of artist (mj))
User can specify mj on Spotify, iMusic and Pandora etc..
Is this doable?
You cannot invoke Alexa again like 'Alexa, play music on Spotify' when one session is going on. There is one custom solution you can do that too only if other services (like Spotify) has exposed a REST API to use. If they have a REST API then what you can do is, after opening your skill (Alexa, launch Michael Jackson app) you can give options to user like below,
say 1 to play music on Spotify
say 2 play music on Pandora
say 2 play music on podcast
One user responds with numbers ( 1, 2, 3 etc.) then you can another input from the user for the artist name. Now call the corresponding API according to user input.
Please note all these logic would be possible only if another party has exposed a REST API.
Yes, this can be done in several ways. One would require that your app respond to the launch request, and also 3 intents:
"Alexa, open Michael Jackson app" would launch your app. It should respond to the launch request with something like "where would you like me to play Michael Jackson? You can say spotify, pandora, or podcast"
SpotifyIntent: "play music on Spotify" or even just "Spotify"
PandoraIntent: "play music on Pandora" or even just "Pandora"
PodcastIntent: "play music on podcast" or even just "podcast".
Your intent handlers would then need to make the REST calls to the selected service.
This could also be done using slots, but I think the above is about the simplest way to accomplish what you describe.