Go Audio Lesson Tool

For discussing go computing, software announcements, etc.
User avatar
Li Kao
Lives in gote
Posts: 643
Joined: Wed Apr 21, 2010 10:37 am
Rank: KGS 3k
GD Posts: 0
KGS: LiKao / Loki
Location: Munich, Germany
Has thanked: 115 times
Been thanked: 102 times

Go Audio Lesson Tool

Post by Li Kao »

What is it?
Since there is a lack of free Audio lessons and existing tools like Livestream create low quality videos which can't be downloaded easily I've created this tool so everybody who wants can create audio teaching games which can be shared as a simple file.
This is the first usable alpha release, so it's not feature complete yet and probably still has some bugs.
Requires Windows and .NET framework 3.5 SP1

Features:
* Records and plays Audio-Lessons
* Marker and review tools similar to KGS. One difference is that secondary Actions are used with the right mouse-button
* Game Variation Tree

Known Issues:
* Most commands in the game and navigation menus are not implemented yet
* It sometimes doesn't play the last second of a lesson

Planned for later versions:
* SGF Import/Export
* Multiplayer

GitHub
Source Code
Download
Attachments
GoAudioLessonTool.png
GoAudioLessonTool.png (24.27 KiB) Viewed 24323 times
Last edited by Li Kao on Sat Jun 25, 2011 7:12 am, edited 5 times in total.
Sanity is for the weak.
rubin427
Lives in gote
Posts: 338
Joined: Sat Dec 05, 2009 9:24 pm
GD Posts: 0
Location: Las Vegas, NV
Has thanked: 163 times
Been thanked: 62 times

Re: Go Audio Lesson Tool

Post by rubin427 »

This is a very interesting project.

1) Is there any chance you might be releaseing the code?
2) Do you care to go into any detail about the file format you use to store the game reviews? Is there any hope of other applications being able to support the format?
User avatar
Li Kao
Lives in gote
Posts: 643
Joined: Wed Apr 21, 2010 10:37 am
Rank: KGS 3k
GD Posts: 0
KGS: LiKao / Loki
Location: Munich, Germany
Has thanked: 115 times
Been thanked: 102 times

Re: Go Audio Lesson Tool

Post by Li Kao »

rubin427 wrote:This is a very interesting project.

1) Is there any chance you might be releaseing the code?
2) Do you care to go into any detail about the file format you use to store the game reviews? Is there any hope of other applications being able to support the format?


1) Yes I'll release to code at some point in the future. But I need to choose a licence, check the licence of the libraries,... so it might take some time. If somebody is interested I can share the code with him now, I just don't want to release it to the public before cleaning it up and taking care of licensing.
2) Currently it uses a zip container(might change in the future to support streaming).
Inside the .zip file there is a ogg-vorbis encoded audiofile and a textfile in my own format containing the replay.
I didn't use sgf internally since sgf didn't seem suitable to record the time based changes to the game tree. But since the format isn't completely stable yet it's too early to support it elsewhere. And the time based content probably requires a code structure a bit different from what a normal sgf editor uses.
Sanity is for the weak.
rubin427
Lives in gote
Posts: 338
Joined: Sat Dec 05, 2009 9:24 pm
GD Posts: 0
Location: Las Vegas, NV
Has thanked: 163 times
Been thanked: 62 times

Re: Go Audio Lesson Tool

Post by rubin427 »

Li Kao wrote:
Inside the .zip file there is a ogg-vorbis encoded audiofile and a textfile in my own format containing the replay.


Nice choice.

Tonight I'll have to figure out where I put my windows hard drive (bookshelf, maybe) and give your software a try.
User avatar
Tryphon
Lives with ko
Posts: 299
Joined: Tue Apr 20, 2010 2:32 am
Rank: KGS 10k DGS 8k
GD Posts: 396
Has thanked: 49 times
Been thanked: 17 times

Re: Go Audio Lesson Tool

Post by Tryphon »

If the tool could allow to record an audio comment from KGS, it'd be paradise :)
ethanb
Lives in gote
Posts: 355
Joined: Sat Apr 24, 2010 10:15 am
Rank: AGA 2d
GD Posts: 0
IGS: ethanb
Has thanked: 52 times
Been thanked: 43 times

Re: Go Audio Lesson Tool

Post by ethanb »

Li Kao wrote:
rubin427 wrote:This is a very interesting project.

1) Is there any chance you might be releaseing the code?
2) Do you care to go into any detail about the file format you use to store the game reviews? Is there any hope of other applications being able to support the format?


1) Yes I'll release to code at some point in the future. But I need to choose a licence, check the licence of the libraries,... so it might take some time. If somebody is interested I can share the code with him now, I just don't want to release it to the public before cleaning it up and taking care of licensing.
2) Currently it uses a zip container(might change in the future to support streaming).
Inside the .zip file there is a ogg-vorbis encoded audiofile and a textfile in my own format containing the replay.
I didn't use sgf internally since sgf didn't seem suitable to record the time based changes to the game tree. But since the format isn't completely stable yet it's too early to support it elsewhere. And the time based content probably requires a code structure a bit different from what a normal sgf editor uses.



Since people probably aren't going to be extracting the SGF files from your archive format and using them as-is in a database tool or something, you should be able to abuse the BL/WL codes to provide timestamping for the audio sync.

In the case of branch traversal during the lecture, you could put multiple timestamps on the node in the file and mangle it in memory on import to create a linear array of board positions with associated timestamps.

If you provide an SGF export function, you can just strip out the BL and WL properties for each node on export - many SGF readers don't pay attention to them anyway (although Quarry does!) and they're optional, not essential.

You could also create your own unique property TS (time sync) or something and again, strip it out when you export the SGF file.

Seems like doing that would serve the purpose quite well and also make importing files from other programs much easier; the work is already done apart from recording the audio.

Edit with pseudo gametree for demonstration:

root node: game info
node 1: B, TS=00:00:00
node 2: W, TS=00:43:78
node 3: B, TS=01:00:03, TS=01:50:47, TS=02:46:90
node 4: W, TS=01:33:22, TS=02:47:64
node 5: B, TS=02:56:00
node 4A (variation): W, TS=01:57:02

On reading the file the full board position would be calculated for each node, and then pointers to the board positions would be pushed into the appropriate place in the array sorted by timestamp. Then calculate elapsed time after starting the audio and draw the position from the associated pointer when you reach the next timestamp.

TS=00:00:00, display board as in node 1
("This is the second title match of the 21st Honinbo, blah blah")
TS=00:43:78, display node 2
("White plays here and offers a diagonal fuseki")
TS=01:00:03, node 3
("Black plays in the bottom right and it'll be a parallel opening")
TS=01:33:22, node 4
("Ok, so it's normal so far. For beginners, what I meant by diagonal was...")
TS=01:50:47, node 3 [lecturer went back one move]
TS=01:57:02, node 4A [lecturer played a move to make a new variation]
("Black could play here, and it would probably be a fighting game.")
TS=02:46:90, node 3 [lecturer went back to 3]
TS=02:47:64, node 4 [then back to the real 4th move]
("But he didn't, so it's like this.")
TS=02:56:00, node 5
("And white approaches...")
User avatar
tchan001
Gosei
Posts: 1582
Joined: Wed Apr 21, 2010 6:44 pm
GD Posts: 1292
Location: Hong Kong
Has thanked: 54 times
Been thanked: 534 times
Contact:

Re: Go Audio Lesson Tool

Post by tchan001 »

You might also want to take a look at Multigo which also has audio commentary recording capabilities to go with game records.

http://www.ruijiang.com/multigo/features.php
http://tchan001.wordpress.com
A blog on Asian go books, go sightings, and interesting tidbits
Go is such a beautiful game.
User avatar
fwiffo
Gosei
Posts: 1435
Joined: Tue Apr 20, 2010 6:22 am
Rank: Out of practice
GD Posts: 1104
KGS: fwiffo
Location: California
Has thanked: 49 times
Been thanked: 168 times

Re: Go Audio Lesson Tool

Post by fwiffo »

Have you considered using a speech-specific codec like speex to save on file size?
User avatar
Li Kao
Lives in gote
Posts: 643
Joined: Wed Apr 21, 2010 10:37 am
Rank: KGS 3k
GD Posts: 0
KGS: LiKao / Loki
Location: Munich, Germany
Has thanked: 115 times
Been thanked: 102 times

Re: Go Audio Lesson Tool

Post by Li Kao »

Tryphon wrote:If the tool could allow to record an audio comment from KGS, it'd be paradise :)

I might work on that, but probably only for the person giving the lecture. I don't want people to be able to record KGS+. But I'd like to allow recording of free lectures (like those by Battousai).

@ethanb
I'll use a similar format for sgf-export. You can use undefined tags when writing SGF and SGF readers need to ignore&preserve them.
I won't use it as internal format since several features(Multiplayer,Cursor display) would be more annoying when using sgf. Also Sgf can't cope with a stone or label being added and removed in the same node.

@fwiffo
I considered speex. But the main advantage of Speex is low latency. The lowest vorbis quality(Q0, about 30kbit/s, I'm currently using Q3 but will probably use something lower) should be small enough. The main advantage of vorbis is html5 support. And I'd like to have a javascript+html5 player.
Sanity is for the weak.
User avatar
CarlJung
Lives in gote
Posts: 429
Joined: Wed Apr 21, 2010 1:10 pm
Rank: SDK
GD Posts: 0
KGS: CarlJung
Location: Sweden
Has thanked: 101 times
Been thanked: 73 times

Re: Go Audio Lesson Tool

Post by CarlJung »

Li Kao wrote:Also Sgf can't cope with a stone or label being added and removed in the same node.


Why is it necessary to have have them in the same node?
What's wrong with:

Code: Select all

;B[dd]
;AE[dd]
ethanb
Lives in gote
Posts: 355
Joined: Sat Apr 24, 2010 10:15 am
Rank: AGA 2d
GD Posts: 0
IGS: ethanb
Has thanked: 52 times
Been thanked: 43 times

Re: Go Audio Lesson Tool

Post by ethanb »

Li Kao wrote: Also Sgf can't cope with a stone or label being added and removed in the same node.


If you think you have a reason to add and remove the same stone in one node, I'm pretty sure you're confused about how the SGF format works. If you add a black stone at tengen, and remove it at the exact same time, what exactly are you hoping will display on the screen?
User avatar
Harleqin
Lives in sente
Posts: 921
Joined: Sat Mar 06, 2010 10:31 am
Rank: German 2 dan
GD Posts: 0
Has thanked: 401 times
Been thanked: 164 times

Re: Go Audio Lesson Tool

Post by Harleqin »

ethanb wrote:
Li Kao wrote: Also Sgf can't cope with a stone or label being added and removed in the same node.


If you think you have a reason to add and remove the same stone in one node, I'm pretty sure you're confused about how the SGF format works. If you add a black stone at tengen, and remove it at the exact same time, what exactly are you hoping will display on the screen?


That is the point: a lesson does not simply follow the SGF nodes, it jumps around and perhaps even changes them. Therefore, it is conceptually not possible to incorporate such a lesson into an SGF file. Instead, you need a format that describes the actions; this format can operate on an SGF file.

The alternative is of course to have prepared slides, but this means that the teacher has more work before the lesson.
A good system naturally covers all corner cases without further effort.
ethanb
Lives in gote
Posts: 355
Joined: Sat Apr 24, 2010 10:15 am
Rank: AGA 2d
GD Posts: 0
IGS: ethanb
Has thanked: 52 times
Been thanked: 43 times

Re: Go Audio Lesson Tool

Post by ethanb »

Harleqin wrote:
ethanb wrote:
Li Kao wrote: Also Sgf can't cope with a stone or label being added and removed in the same node.


If you think you have a reason to add and remove the same stone in one node, I'm pretty sure you're confused about how the SGF format works. If you add a black stone at tengen, and remove it at the exact same time, what exactly are you hoping will display on the screen?


That is the point: a lesson does not simply follow the SGF nodes, it jumps around and perhaps even changes them. Therefore, it is conceptually not possible to incorporate such a lesson into an SGF file. Instead, you need a format that describes the actions; this format can operate on an SGF file.

The alternative is of course to have prepared slides, but this means that the teacher has more work before the lesson.


Did you read my earlier post? You put multiple timestamps in the node, so that it says "display this at 15 seconds in, 75 seconds in, and 92 seconds into the audio stream."

EDIT: you may have a similar (but quite understandable!) misconception about the SGF tree. An SGF node does not equal a game move. An SGF node is simply a unit of logical delineation which may have any number of attributes associated with it, one of which MAY be a game move. So when the lecturer adds a label to an existing position while recording the audio commentary, it would create a new node with no additional moves, but a label (and audio timestamp) only.
User avatar
Li Kao
Lives in gote
Posts: 643
Joined: Wed Apr 21, 2010 10:37 am
Rank: KGS 3k
GD Posts: 0
KGS: LiKao / Loki
Location: Munich, Germany
Has thanked: 115 times
Been thanked: 102 times

Re: Go Audio Lesson Tool

Post by Li Kao »

ethanb wrote:
Li Kao wrote: Also Sgf can't cope with a stone or label being added and removed in the same node.


If you think you have a reason to add and remove the same stone in one node, I'm pretty sure you're confused about how the SGF format works. If you add a black stone at tengen, and remove it at the exact same time, what exactly are you hoping will display on the screen?

If I add it, and remove it 0.5s later I expect the stone to be visible for 0.5s.

Of course I could follow CarlJung and create a new node each time. But is annoying for two reasons:
1) It creates a lot more nodes than a normal sgf editor would create (each click of the user=new node)
2) I need to copy all decorations(Labels) from the previous node which inflates the file and is annoying to work with.

I think an action sequence is more appropriate to achieve video like behavior. At each point in time I have a game-tree which basically corresponds to a normal sgf-file.
I'll add a export function for the format you suggested, but the export probably loses a bit of information.
But if other coders think that this export is useful I can add it as a non authoritative version into the zip file.

IMO the most important features to add ATM are KGS recording and sgf import.
Sanity is for the weak.
ethanb
Lives in gote
Posts: 355
Joined: Sat Apr 24, 2010 10:15 am
Rank: AGA 2d
GD Posts: 0
IGS: ethanb
Has thanked: 52 times
Been thanked: 43 times

Re: Go Audio Lesson Tool

Post by ethanb »

Li Kao wrote:
ethanb wrote:
Li Kao wrote: Also Sgf can't cope with a stone or label being added and removed in the same node.


If you think you have a reason to add and remove the same stone in one node, I'm pretty sure you're confused about how the SGF format works. If you add a black stone at tengen, and remove it at the exact same time, what exactly are you hoping will display on the screen?

If I add it, and remove it 0.5s later I expect the stone to be visible for 0.5s.

Of course I could follow CarlJung and create a new node each time. But is annoying for two reasons:
1) It creates a lot more nodes than a normal sgf editor would create (each click of the user=new node)
2) I need to copy all decorations(Labels) from the previous node which inflates the file and is annoying to work with.

I think an action sequence is more appropriate to achieve video like behavior. At each point in time I have a game-tree which basically corresponds to a normal sgf-file.
I'll add a export function for the format you suggested, but the export probably loses a bit of information.
But if other coders think that this export is useful I can add it as a non authoritative version into the zip file.

IMO the most important features to add ATM are KGS recording and sgf import.


Ah well, I'm not trying to turn this into a religious war over architecture - you're making a tool which will be useful to everybody, use whatever format you like.

I just think there's a way you can do it without "reinventing the wheel" internally (yeah, you'd want to mangle the dataset on export anyway so you wouldn't have 16 "empty" label nodes) but if you're already where you want to be with your data structure, that's cool. :)
Post Reply