• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Audio with javascript + streaming from google drive.

Participant ,
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

399

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

Community Expert , 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 

Votes

Translate

Translate
Community Expert ,
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.

Votes

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
Community Expert ,
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 

Votes

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
Participant ,
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?

Votes

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
Community Expert ,
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 

Votes

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
Participant ,
Mar 08, 2021 Mar 08, 2021

Copy link to clipboard

Copied

LATEST

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.

Votes

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