[Gllug] Sound generation to be played by a browser

Andrew Farnsworth farnsaw at stonedoor.com
Tue Feb 1 12:40:34 UTC 2005


Alain Williams wrote:

>Hi,
>
>I want to dynamically generate sounds that can be played by a web browser,
>this is so that I can hold my phone next to the speaker, click on a phone number
>& generate the dial tones. This already works on the local machine (ie write to
>/dev/dsp).
>
>To work via a web browser I should probably generate a mpeg.
>
>Questions:
>
>1) Should I use some other format than mpeg, ie is something else better
>   supported by more browsers ?
>
>2) Any suggestions on the best (small/simple) library to generate the format
>   in (1) ?
>
>  
>
DTMF is notoriously hard to generate and might be a bit much for 
javascript, you might have better luck putting up a cgi that has all 16 
[0] DTMF [1] codes prebuilt as sounds and will return a compilation of 
them to the browser as an audio stream.

1) mpeg is probably best if you are streaming, if you generate it on the 
browser, you might have better luck generating WAV files.

2) Nope, no idea at all other than my suggestion above for the CGI.

Footnotes:

[0] - For those who don't know, the 16 DTMF codes are 0-9, #, *, A, B, 
C, and D.  Normal telephones don't have ABCD as they are usually only 
available on test sets, though most modems will generate them if you put 
them in the dialing string (i.e. ATDT 02085551212,ABCD)

[1] - DTMF : Dual Tone Multi-Frequency. The technical term describing 
Touch Tone dialing. Basically the combining of two tones, one low 
frequency and one high frequency.
             See http://www.dialabc.com/sound/dtmf.html for pretty pictures

Andrew Farnsworth

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list