Wednesday, March 22, 2006

SGF GoCasts

Audiogolessons.com offers spoken Go lessons with Go games, but it has a few limitations: The lessons are "rented out" to you and you will never have access to them on your own computer. If you have paid 100 Euro for 100 lessons and they go out of business, you're out of luck.

After some time has passed you'd have to pay again if you want to listen to the same go lesson you've already paid for. It requires Java as well, which makes it a no-no for me.

Why are there no SGF files with embedded audio, so you can buy it once and don't have to pay next year if you want to listen to it again? Just like buying a DVD. You would be prohibited from copying it, but at least you would own the media.

The answer is simple: This technology does not exist. This will, heaven permitting, change soon because I am working on it. In just a few days I hope to have a full-fledged audio recording feature in MoyoGo that embeds audio in ordinary SGF files and remains 100% upwards and downwards compatible with the standard SGF file format, meaning that any old SGF reader out there will not choke on MoyoGo's SGF files with embedded audio.

Last year I identified a a bug in various commercial and non-commercial SGF readers that caused them to "hang" on very large custom-defined SGF properties, but I have notified their authors and for example SmartGo has fixed this issue.

MoyoGo already is able to embed custom-defined data in SGF: When the editor is in Rich Text mode. Two years ago everybody told me that embedding "ASCII-encoded binary" data into SGF was a stupid idea, but I now have hundreds of customers and they are asking me to do it :)

If all goes well, somewhere next week, they will be able to comment their games and email a single SGF to their friends. No linking to external files required, because that always, sooner or later, causes broken links. Apart from that, SGF files that link to external data are a security risk, think about buffer overflow exploits by a malicious audio file.



Since MoyoGo will set yet another standard, it is important to get it right the first time. There are strict requirements on the audio system:

- Must use a freeware codec. We don't want the situation like with MP3, where the minimum licence fee to create MP3's is 15,000 USD/year and the Fraunhofer Institute will sue you if you don't cough up the dough. I bet you didn't know that? Even the Jpeg format has been patented and like used to be the case with GIF, they've suddenly started to demand money.
- Must be optimized for speech, so that it encodes high-quality speech with a very low bitrate.
- Must have built-in robustness for dropped packets when streamed over TCP/IP, because we want to be able to have VoIP functionality as well, so we can multicast an SGF file with audio.
- Must encode quickly. It would be too cumbersome to record audio if you have to wait ten seconds after every short commentary.

I have found a solution that satisfies all of the above: The Speex codec.