Reading web pages?
To make your web pages available over the Internet is one thing, but what do you do to have them read, let's say on your FM radio via VHF? Here is a brief description of how it's done on my computer.
de SM6VYF/Arne.
To make your web pages available over the Internet is one thing, but what do you do to have them read, let's say on your FM radio via VHF? Here is a brief description of how it's done on my computer.
To be able to read web pages it's necessary to first convert, in this case, the XML coded page into plain text. When doing this some parts have to be omitted, e.g. images, source code and such, further abbreviations has to be expanded and only local links has to be handled. Close at hand lies then the same technique that I've used to produce the other variants of these pages (c.f. web technology). For this a new XSLT is called for, one that can translate XML into text.
Since I've already, as mentioned, have made a couple of different XSLT for some web document types, it was quite easy to make yet another version, in this case for plain text. It really got to be a simplified version of the others, although the menu handling had to be done in a different manner and the creation of a numbered index was added.
The text that's created in this way now has to be read by a text-to-speech system. I've chosen to use the Festival speech synthesis system. There is also a swedish voice available for this system, but for the time being I've settled to only have the pages read in english. The swedish voice doesn't quite handle the technical type of text that makes out most of these pages.
To get a specific page of these pages read over FM radio, there has to exist some kind of possibility for input over radio. The ideal would be speech recognition, but a more simple way is to use DTMF.
DTMF, which is known amongst users of modern telephones, consists of a combination of two tones that defines what key is pressed. Since this technology is very common there are plenty of circuits available for both coding and decoding these tones. This functionality is usually present in e.g. handheld tranceivers for amateur radio.
For my purposes I need to decode the DTMF that arrives at the radio and then pass this information on to the computer, i.e. some sort of interface between the radio and the computer. Fortunately there was such an interface waiting in my junk box. This interface was built for another project, after an article by KG7SG in QST of June 1995, pp. 35-37.
This interface consists of one part that decodes incoming DTMF and outputs the result to the serial interface of the computer. Also it handles the radio's PTT using the serial interface's RTS signal. The speech from the computer's sound card is simply connected to the radios microphone input.
Maybe, now, this project has earned a box of its own...
The system consists of a small, about 150 rows, Perl program (with som help from CPAN). The program starts by initiating the serial port, initiating the XML parser, loading the XSL transform and finally creates an index for the web pages.
After this the program waits for input of page numbers. This page number is converted, using the index, to an URI and then an attempt of fetching the page is made. I've chosen to use the computer's web server to get the web pages instead of fetching the files directly. The reason for this, is that I can then make use of the servers ability of content-negotiation och MultiViews. In this way I can easily obtain the appropriate version of the page, in this case the XML version and preferably in english. Should the server respond with something else, then language errors are caught by the XSLT and other errors are caught by the program itself.
At the end of every page delivered, the program appends first, if needed, a list of local links and then a station identification text.
The system's function is to, fore every incoming correct DTMF sequence respond by reading the corresponding web page. Since some pages are available only in swedish and some contains unreadable text, simple error messages are created and read for these pages. At the end of the page a section of links for other pages at this site is added, so that these pages can easily be accessed.
The pages are referred to by a number. It had been possible to refer to them by their file name, using a coding scheme, but it tuns out that this is to difficult to input on most handheld radios.
To make up som kind of protocol, a correct sequence must start with a 'C', followed by the page index, and then finish with a '#', e.g. C28#. Every input # empties the input buffer.