This experimental webpage uses Web Audio and earbuds to test an old Ultratec Supercom TTY TDD.
bug: it needs a call to makeNoise() before mic works.
They have been used by the deaf and speech impaired to make phone calls using TYPE and READ. My device dates back to 1987 - 1994. It is very sensitive to the air path.
NOTE:- This webpage needs more work before it can be used for real TDD / TTY calls.
The Ultratec Supercom TDD or TTY uses BAUDOT @ 45 baud, to send and receive text during a phone call.
Using Web Audio, listen to the microphone and decode as BAUDOT at 45 BAUD. Encode text to BAUDOT at 45 BAUD, and use Web Audio to output. Use headphones or earbuds to Acoustic couple to a Ultratec Supercom TDD TTY. Demostrate that the Ultratec Supercom TDD or TTY can decode the audio. At the moment, this needs more work to support a live call.Copied from the source on Github and V.18 | good examples | Mozilla WebAudio Analyser | Microsoft WebAudio | getUserMedia |
If you run this page on a second device, it is possible to get one to squark, and the other device decode it. It seems to mute the microphone when squarking.
Some pictures:-
I brought this Ultratec Supercom, which dates from between about 1987 to 1994.
Can a web page, Web Audio, some cheap earbuds with microphone, and milk bottle tops work work? - Yes

Ultratec manuals have:-

I brought this Ultratec Supercom, which dates from about 1987 to 1994
Ultratec have often adapted their TTY TDD over the years. This site has manuals for minicom III and Superprint 200. more information support and manual for later model support and manual for later model

It uses acoustic couplers. You dial the numbers on the phone and place the handset on the rubber cups.

Can a web page, Web Audio, some cheap earbuds with microphone, and milk bottle tops work work? - Yes

This page can encode some text and the Ultratec Supercom decodes the audio.
When I plugged in some earbugs with a microphone, into my laptop, this page can decode the output from my Ultratec Supercom Textphone using BAUDOT.
It seems that Web Audio and earbuds only supports HALF-DUPLEX. If you open this page twice on the laptop, it is observed that the mic is muted when it squarks. So this page cannot listen to itself, and it is unlikely it can use DUPLEX which CCITT V.21 uses. It is possible to use Web Audio to generate V.21 squarks, and see it displayed on the Ultratec Supercom.
When you turn it on, the Ultratec Supercom uses BAUDOT @ 45.45 BAUD, which uses HALF-DUPLEX.
It is similar to the Ultratec Superprint 100 / 200

I taped some cheap earbuds with microphone to the handset of my PSTN phone
A plastic cup from a vending machine helped.

A proof of concept acoustic coupler using earbuds with a smartphone:

Mount the earbuds in a bottle top so it can be taped to a phone handset.

Using the Earbud Acoustic Coupler taped to a Converse 300 phone and plugged into a smart phone that is running this page in Chrome. The keyboard fills the half the screen!

Use a weight to hold down the hook switch, to hang up.

A simpler "proof of concept" acoustic coupler could use two foam washing up pads, to hold the ear bud and microphone

after dialling number on the phone, place the handset on the foam pads that

Cut a slot in the foam pads to hold the microphone.

This picture shows the ear buds plugged ito my laptop. The two washing up sponges, next to the phone, hold the transducers in place. Dial the call on the phone, and place the handset on the washing up pads so that the transducers are held against it. It was possible to dial the Helpdesk number and check my Textnumber.

NOTE: I could only get Webaudio to work for BAUDOT, which is Half-Duplex. I do not think it will be possible to get V.18 DUPLEX to work.
I dialled the access number and can hear modem beeps, so I press a key to send BAUDOT
It types out the welcome message and asks for 1 or 2
I had to press # to send SHIFT-FIGS before the 1 or 2
( I added a # or @ to force a shift based on the first char )
The service responds, and I hang up.
When typing in single characters, it does not remember and does not send shift
Maybe it needs to force a shift based on the character typed.
I can also use a headset with boom microphone, held againt the Ultratec Supercom or PSTN phone handset. This is fiddly.
NOTE: Use HTTPS - getUserMedia() is a powerful feature that can only be used in secure contexts;
you needs two devices. The mic on the ear bud seems to be muted during output.
For security reasons, a webpage user must explicitly allow access to the microphone, press the button below:
use a shift: # figs, @ ltrs, e.g. #1 or #2. Needs initial SHIFT.
Decoded: ( \-CR, \-LF, @-Shift_LTRS, #-Shift_FIGS ) , improvements needed.
signal meter gain: 50
decoded BAUDOT picked up by microphone
TypeHere:
NOTE: This now adds # or@ based of the first character to assert a shift. still issues.
Send - BAUDOT: Use @ for SHIFT_LTRS , and # for SHIFT_FIGS/numbers. Start with "@#@"
decoded BAUDOT picked up by microphone
BAUDOT codes found
Add Shifts:
This WebAudio sample trys to decode BAUDOT modem, using a ScriptProcessor. It's necessary to use a ScriptProcessor in order to not miss any clipping samples - otherwise you could implement this using a RealtimeAnalyser to only grab samples when necessary.
The usage is quite easy:
var meter = createAudioMeter(audioContext,clipLevel,averaging,clipLag);
[ mic ] -+--[ iir filter ]--[ mark energy ]--+ [ comparator ]--[ UART ]--[code]
\--[ iir filter ]--[ space energy ]--/
mark 1400Hz, space 1800Hz, serial --_12345-- UART to codes --
audioContext: the AudioContext you're using.
meter.checkClipping();
returns true if the node has clipped in the last clipLag milliseconds.
meter.shutdown();
used to destroy the node (it's important to disconnect and remove the event handler for any ScriptProcessor).
Copied from the source on Github and V.21 | and V.18 | good examples | Mozilla WebAudio Analyser | Microsoft WebAudio | getUserMedia | /* https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia getUserMedia() is a powerful feature that can only be used in secure contexts; in insecure contexts, navigator.mediaDevices is undefined, preventing access to getUserMedia(). A secure context is, in short, a page loaded using HTTPS or the file:/// URL scheme, or a page loaded from localhost. */
I would like to use the microphone on the plugged in earbuds. this page is only using the microphones on the screen
media recorder example - using Using the MediaStream Recording API seems to be using the ear bud mic, but I cannot work out why.
I can use one device to send to another. This is very sensitive to the air path between them. My headphones microphone can be used.
The 5-bit mode is defined in ANSI TIA/EIA-825 (2000), A Frequency Shift Keyed Modem for use on the Public Switched Telephone Network. The communication channel is half-duplex with no channel turnaround. Carrier is transmitted 150 ms before the first character is transmitted. The receiver shall be disabled for 300 ms when a character is transmitted to mitigate false detection of echoes (in non-V.18 devices, the carrier may remain for up to 1 s after the last character to provide this same function).
The modulation is frequency shift-keyed modulation (i.e. no carrier is present when a character is not being transmitted) using 1400 Hz ( ±5% ) for a binary 1 and 1800 Hz ( ±5% ) for a binary 0. A bit duration of either 20 or 22.00 ± 0.40 ms is used providing either a nominal data signalling rate of 50 or 45.45 bits/s respectively.
shifted
FIGS, LTRS
BAUDOT codes found
on key press , buffer key send shift for first char assert shift every 71 char Microphone AGC clipping colours graph
I wanted to use items that were readly available from local shops. I could buy Earbuds from Poundland, and while washing up, it occured to me that washing up sponges would allow me to try out a proof of concept acoustic coupler.
A simpler "proof of concept" acoustic coupler could use two foam washing up pads, to hold the ear bud and microphone
Using this webpage, the earbuds mounted in the washing up sponges, I could dial the number on the phone and place the handset on my "acoustic coupler"

It may need more work for mobiles.

after dialling number on the phone, place the handset on the foam pads. You will need to find the best placings of the transducers. Avoid reflections.

Cut a slot in the foam pads to hold the microphone.

I asked an AI tool to draw me my idea of using Washing up pads to make an acoustic coupler, and got these amusing versions:-



Which reminded me of the tree swing poster, as seen on the University of London Computer center news letter March 1973 :-


I had a go at the Web Audio and got a Web page to talk BAUDOT. Its on my web site. It is unlikly to do V.21 due to the audio being too clever and HALF-DUPLEX. After about 10 seconds of receiving V.18 tones, the signal is attenuated!
So where have I got to with Web Audio?
A webpage can do WebAudio, and I can use it to emulate an Acoustic Coupled BAUDOT based Textphone.
eBay sourced me a Ultratec Supercom and Compact text phone that only use acoustic couplers.
I enjoyed playing the modem squarks and getting the text to appear on the VFL display.I have spent some time trying to get it to listen to the Textphone and decode the modem squarks.
Issues I have found:-
* I am not sure if a webpage to act as a BAUDOT textphone is anything more than a curiosity.
* It is a suitable retirement project. It would have been useful for test.
* Using modems is considered obsolete.
* Readily available kit is hard to come by. WebAudio provides a way to do realtime audio, but only HALF-DUPLEX.
* It needs an acoustic coupler
- USB Headset can be used.
- Earbuds from Supermarkets, I use washing up sponges to hold the earbuds in place.
* It works in a quiet room.
I can generate the audio for all the V.18 modems.
WebAudio to generate modem squarks
* It can be used to explore and test the TextRelay nodes and my TextPhones
* The audio system seems to only support HALF-DUPLEX
* It does not seem to support DUPLEX audio needed for V.21
* If you open this web page multiple times, it shares the same Audio devices, mixing by adding the signals.
My web page discusses possibly ways you could combine signals
* If the V.21 carrier are received, the audio subsytem tries to filter out the "unwanted" tone after about 10 seconds.
The ITU specs are complicated, you need to read V.21, V.25, V.24 and V.18.
* The Ultratec TextPhone handbooks avoid the detail what the "codes" mean.
* I found that I need to send a front porch of carrier / MARK to raise the carrier detect.
The Webpages help explore VCO and returning to TEXT
* If the user is returning to TEXT, the Hayse command ATD, does not send Carrier, you have to use ATA
* We found that the Geemarc Screenphone used the V.21 ( ANS ) carrier, when returning form VCO.
In the end I have got a proof of concept webpage to interact with a Textphone using BAUDOT. It needs an acoustic coupler. Mine uses earbuds from Poundland mounted in washing up sponges.
I did use it to contact the Helpdesk, but it would be unkind to expect the Helpdesk to support them.
I made a TEXT to TEXT call to the App as well.
I tried to get Gemini AI to write code for a V.21 modem, coded in Web audio and C
It was suprisingly good, but did not find the front porch requirments and It did not work, so I parked it for another day.
Gemini AI's pictures for the Acoustic Coupler miss the point.
I last used an Acoustic Coupler over 40 years ago! We used it to dial up the computer the other side of town.
We used it to dial tp the computer running CATNAP