VXML audio file playing status - audio

I have a VXML (say vxml-1) which contains simple audio file for announcement followed by a goto element pointing to next vxml doc(say vxml-2) containing another audio file for announcement. Once the execution starts, vxml-1 loads with corresponding audio followed by goto execution. Now when the user hangs up, in the background it shows that it ended at vxml-2 because of very fast goto transition, but actually the user hung up at the audio of vxml-1 because of its long length. How can I determine if the user actually hung in between of audio of vxml-1 ? Is there any inbuilt function or property of audio tag like start or end in VXML ?

Because of the way voice xml documents are processed, both audio files are queued (ie both pages executed) before the customer even notices audio is playing.
To accomplish what you want, create a form on the first page with an input (any input grammar will do) with a very short timeout. That way, the user doesn't navigate to the next page until they audio file has played and the timeout expired.
Note, the timeout and page navigation will add a delay. You can keep the timeout short, but the platform and page complexity determine how long it takes to navigate to the next page. To try and minimize the delay, make sure your audio files a trimmed of silence at the beginning and end.

Related

Control Actions-on-Google Media-Response (e.g. start at minute 3)

i want to develop an google-action. (ideally using dialogflow).
but the google-action needs some features where i couldn't find a solution, and i'm not sure if it's even possible.
My Usecases:
The google action starts a mps. someone stops and exits the google action, and if the user starts the google action again, i would resume the mp3.
but i couldn't find a solution where i can determine the "offset", when the user stops the mp3.
and even i would have this offset, i didn't find a solution how to tell google assistant, that i want to play the mp3, but starts at e.g. Minute 51.
I would be really wondered, it the google action possibilitys are so extremly restricted.
can someone confirm, that this usecases are not possible, or can someone give me a hint how to do it?
i only found this one, which is restricted to start a mp3 at beginning.
https://developers.google.com/actions/assistant/responses#media_responses
Kind Regards
Stefan
To start an mp3 file at a certain point you can try the SSML tag and its clipBegin property.
clipBegin - A TimeDesignation that is the offset from the audio source's beginning to start playback from. If this value is greater than or equal to the audio source's actual duration, then no audio is inserted.
https://developers.google.com/actions/reference/ssml
To use this, your mp3 file has to be hosted using HTTPS
Hope that this helps.
You could use the conversational actions (instead of dialogflow) where media responses allow using a start_offset
....
"content": {
"media": {
"start_offset": "2.12345s",
...
For more details see
https://developers.google.com/assistant/conversational/prompts-media#MediaResponseProperties
Even conversational actions seem to be the "newest" technology for google actions. Or at least released recently.

How does #EXT-X-DISCONTINUITY-SEQUENCE tag work in HLS m3u8 file

I'm inspecting about #EXT-X-DISCONTINUITY-SEQUENCE tag in m3u8 file of HLS.
(https://datatracker.ietf.org/doc/html/draft-pantos-http-live-streaming-23#section-4.3.3.3)
Does somebody can explain the working way of it?
For example, let's suppose that m3u8 file is made for live streaming like below,
After 2 seconds segment1.060.ts, file.000.ts will be gone from list and #EXT-X-DISCONTINUITY tag too.
after all file.001.ts is going to be first media segment in the list.
At this state, what sequence number should be in #EXT-X-MEDIA-SEQUENCE, #EXT-X-DISCONTINUITY-SEQUENCE?
#EXT-X-DISCONTINUITY should be put in front of file.001.ts line again?
#EXTM3U
#EXT-X-VERSION:6
#EXT-X-MEDIA-SEQUENCE:60
#EXT-X-DISCONTINUITY-SEQUENCE:0
#EXT-X-ALLOW-CACHE:NO
#EXT-X-TARGETDURATION:2
#EXTINF:0.933600,
segment1.060.ts
#EXT-X-DISCONTINUITY
#EXTINF:0.966911,
file.000.ts
#EXTINF:1.000489,
file.001.ts
The reason why EXT-X-DISCONTINUITY-SEQUENCE must be used for synchronization across variants is explained in the standard:
A client MUST NOT assume
that segments with the same Media Sequence Number in different Media
Playlists contain matching content
and
A client MUST NOT assume that segments with the same Media Sequence
Number in different Variant Streams or Renditions have the same
position in the presentation; Playlists MAY have independent Media
Sequence Numbers. Instead, a client MUST use the relative position
of each segment on the Playlist timeline and its Discontinuity
Sequence Number to locate corresponding segments.
Back to your question:
EXT-X-DISCONTINUITY marks a discontinuity between two consecutive segments. Your discontinuity is between segment1.060.ts and file.000.ts. There is no discontinuity between file.000.ts and file.001.ts so no need to re-insert the tag
each time you remove a EXT-X-DISCONTINUITY from the playlist you must increment the EXT-X-DISCONTINUITY-SEQUENCE
each time you remove a segment from the playlist you must increment the EXT-X-MEDIA-SEQUENCE

Disabling next & previous in Spotify app

Is there any way to disable the next/previous button in the Spotify apps api, like SoundDrop was able to do?
Thanks
When you play a track without a context, or play a track with a context containing only one track, the playback controls are disabled.
SoundDrop takes the first approach — it only plays a single track at a time with no context, and manually plays the next track when it's time.
I managed to resolve this issue.
Setting the context to a context with only one track wasn't the entire solution, since I had to run an undocumented function on the playlist too.
But take a look at my solution here:
Disable next previous buttons in spotify

I need make a cover up when a text file is loading into a form

I am working on a j2me application and I need to wait for a text file into a form. This takes at least 27 seconds and varies. I would like to use an alert to tell the user to wait until the text file is loaded. Is there any way to reduce the time taken to load the text file or is the a way of implementing the alert?
Use an alert with a guage as progress indicator, if you don't want a progress indicator and just want an alert as a busy indicator then don't use a gauge. However giving feedback to the user is always good. Here is a link on how to do this:
http://developers.sun.com/mobility/midp/ttips/alerts20/index.html
On a different note, 27 seconds seems like a lot of time. How big is your text file? how are you processing it. Perhaps this can be optimised as well. Post code snippet if that is an issue.

how to play track from certain position using spotify apps API

I am developing spotify third party application using javascript API.
I am trying to play the track from certain position.
I am having following code,
player.position = 50000;
player.play(track);
But this code plays track from begining.
I want to play the track from certain position.
Is there any way to play track from certain position?
Thanks.
You need to play the track first, then as soon as playback starts seek to the location you want.
You can observe when playback starts by adding an observer for models.EVENT.CHANGE to the player object and looking at the playing property.
You can also link directly to a specific position in a track by adding #1:31 to the end of a URI, for example spotify:track:3iDK8BAaBUatPR84gdfa9g#0:15.

Resources