Audio with javascript + streaming from google drive.

Explorer ,
Feb 28, 2021 Feb 28, 2021

Copy link to clipboard

Copied

1. I have an audio in the library with a linkage of "dude"

2. I use the following code to instantiate and play the audio.

    var audio = new Audio(dude);
    audio.play();

It doesn't work.

3. I need to add 100's-1000's of audio files - (Learning English platform.)

    I would like to host them on google drive and download as necessary. 

    This way I save on traffic to my website. Is that all possible. 

Could you point me in the right direction to learn about streaming audio.

Also, if it's streamed then it won't have a linkage name as it's not in my library so how can I instantiate as needed.

Thanks.

Views

59

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Feb 28, 2021 Feb 28, 2021
Here's  a video that goes into SoundJS and Animate in more detail. https://www.youtube.com/watch?v=bmGJIZo73Zg 

Likes

translate

Translate

Translate
Adobe Community Professional ,
Feb 28, 2021 Feb 28, 2021

Copy link to clipboard

Copied

To play a sound where the audio is in the library with a linkage column name, I tend to use:  
createjs.Sound.play("soundNameInLinkageColumn");

To stop the sound, you could use:
createjs.Sound.stop();

 

For external sound, try 
var myAudio = new Audio('sounds/dude.mp3');
myAudio.play();


Where dude.mp3 is in a subfolder called 'sounds' under your published HTML.

To the other part of your question, if the sound is on a particular URL, you could have:
var myAudio = new Audio(''https://website.com/dude.mp3');

I am not sure if it will work with audio hosted on Google Drive. You could test and see.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Feb 28, 2021 Feb 28, 2021

Copy link to clipboard

Copied

Here's  a video that goes into SoundJS and Animate in more detail.

https://www.youtube.com/watch?v=bmGJIZo73Zg 

Short intro on how to use soundjs in Animate CC (html5 Canvas)

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 28, 2021 Feb 28, 2021

Copy link to clipboard

Copied

Yep, excellent video - that's going to help me a great deal.

So just a quick question.

1 - Can I stream the audios from google drive? I suppose I can.

2 - Can I still use the auto lipsynch feature so that my avatar mc lips synch with the audio OR do I need to drag audio onto a layer at design time in order to use auto lipsynch?

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 08, 2021 Mar 08, 2021

Copy link to clipboard

Copied

Sorry for the delay, did not see your response and questions.

1. You could probbaly load your audio from Google Drive. I'd say test and find out.

2. I haven't used the auto lip synch in Animate. From what I can see, you need to import the audio to get it analysed in the tool. You could try get teh auto lip sych to work and then switch the audio with one loaded exernally. Just thinking out loud without testing. I'll need to give that feature a test. Adobe seem to have a good tutorial on it:
https://helpx.adobe.com/animate/how-to/auto-lip-sync-sensei.html 

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 08, 2021 Mar 08, 2021

Copy link to clipboard

Copied

Thanks Dean.

One I have tested etc... I will post back here. It's a pretty cool tool and I know other people will be looking for help soon. It's pretty amazing for artists. I used to have to spend days just lining things up. It's magic. I also use Character animator - just in case somebody comes across this post. Check it out, it's pretty amazing.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines