State Transition Chat
I want to create a chat interface for State Transition.
- https://subvisual.co/blog/posts/39-tutorial-html-audio-capture-streaming-to-node-js-no-browser-extensions
- https://webaudiodemos.appspot.com/pitchdetect/index.html
Users need a login to access. Once logged in they can create a channel. Users can subscribe to as many channels as they like. A channel can be text only or text+audio.
Text is logged on the server. Audio is just relayed. Users can mute an audio channel.
Audio is push-to-talk. This has some complications. The way I want it to work is that the user presses something to talk. As soon as the talk channel is clear, they'll be given control. So only one user speaks at a time. I need a way to measure levels. If the level is too low, don't broadcast. If the level drops below that for more than 2 seconds, cut off.
I think the layout will be a three column setup. On the left are the top level controls. This includes a list of all channels you are subscribed to. Next to each channel is an indicator of how many messages have been posted since you last looked. On the right is the channel information - each user, if they're muted, if they're speaking. The center will have the text.
The server will run in go. Communication will be websockets.
look into speex.js