Forum Discussion
Changing Speed of Audio in Articulate Storyline?
- 2 years ago
Hi, everyone!
I have some great news to share. We just released another update for Storyline 360. In Update 83, we've included important fixes and new features!
One of the new features we've included:
- Unlock new possibilities for text-to-speech audio. Use speech synthesis markup language (SSML) to adjust the speaking rate, modify pronunciation, emphasize words, add pauses, and more.
Launch the Articulate 360 desktop app on your computer to take advantage of this update, and click the Update button next to Storyline 360. You'll find our step-by-step instructions here.
Please let me know if you need additional help!
So I took this a bit further.
Using the code Owen started. I added a slider to allow for speed adjustment using 0.25 and 1.75 as the lower and upper limits of the slider. This code executes using the "when slider moves" trigger. Works for video too, just use a different variable and use ('video') for the getElement call.
Only using one audio and video file on the slide right now.
for audio:
//this line of code will return an array of all audio tags on the HTML page
var x = document.getElementsByTagName('audio');
//this line of code assigns an ID to the first element in the audio array
x[0].id='testAudio';
var player = GetPlayer();
//get the value of Slider1
var speed = player.GetVar("Slider1");
// set the playback speed based on slider1 value
testAudio.playbackRate=speed;
For video:
var v = document.getElementsByTagName('video');
//this line of code assigns an ID to the first element in the audio array
v[0].id='testvideo';
var player = GetPlayer();
var video_speed = player.GetVar("Slider2");
testvideo.playbackRate=video_speed;
This works great when being run standalone, but I'm getting an empty collection when I run on an LMS.