/    Sign up×
Community /Pin to ProfileBookmark

Sequentially play audio (WAV) files or concatenate WAV files

Is there a way to easily play a sequence of WAV files via JavaScript ? As an alternative, is there an easy way to concatenate a series of WAV files so that the combined file could be played ?

The application is a user survey designed for users with reading disabilities, each page has a question and multiple choice answers, for which WAV files exist. I need to have the page “speak” the questions and answers. Multiple EMBEDS just run all the audio files together … I have seen LiveAudio referenced, but not sure if it’s IE compatible.

Any help in the right direction is appreciated !

Thanks in advance,
..ajm

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@neil9999Sep 07.2004 — Try [url=http://devresource.hp.com/forums/thread.jspa?threadID=1181&tstart=0&forumID=8]this[/url] and [url=http://www.google.com/search?sourceid=navclient&ie=UTF-8&q=Sequentially+play+audio+%28WAV%29+files]this[/url]

Neil
Copy linkTweet thisAlerts:
@gil_davisSep 07.2004 — LiveAudio is a Netscape 4 (only) proprietary feature.

You do not need multiple embeds. The preferred tag is <OBJECT>, and you only need one if you are going to script it.

Microsoft makes a MediaPlayer plug-in for Netscape that is scriptable, and works in NS 4 and NS 7 (I am not sure about 6), and it will give you nearly the same functionality (assuming you can figure it all out) as IE with MediaPlayer.

Essentially, you use the <OBJECT> tag to "embed" the player. The tag needs an ID so that you can reference it in script. You do not need to give it a source initially, so it does not start playing immediately. You can set the source attribute at any time, and issue the play() command to start the audio. The stop() command will turn of the audio.

See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmplay10/mmp_sdk/simpleexampleofscriptinginawebpage.asp for an example of scripting the player.

I would suggest that you use an event to trigger the player. Something like onfocus of the form or give them a "click here for sound" button. You could also use mouseover for short ones. There may be some time lag if the files are big. Make them small by compressing the source. For example, a CD quality file is just about 5.3MB per minute, where a compressed .wav (8khz, 8-bit mono PCM) takes 480KB per minute (if it is just voice, don't use CD quality).
Copy linkTweet thisAlerts:
@amayersauthorSep 07.2004 — Gil and Neil,

Thanks for the great info. I had previously done several web searches without getting any good hits.

..ajm
×

Success!

Help @amayers spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...