Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SeeMeSpeak - A RailsRumble Story

Klaus Fl
December 09, 2013

SeeMeSpeak - A RailsRumble Story

SeeMeSpeak.org is a dictionary for sign language. The app was written during the Rails Rumble Hackathon this year and we got to the 8th place. In this talk I want to show you how we successfully wrote this webapp, how we worked and what we plan for the future of the site.

Klaus Fl

December 09, 2013
Tweet

More Decks by Klaus Fl

Other Decks in Technology

Transcript

  1. - Bodo Tasche (@bitboxer) “We created something I always dreamed

    of: a dictionary for sign language. One that would enable everyone to add participate in it. A real crowd-sourced solution to the problem that is the recording of thousands of signs.”
  2. Challenges • Contributing signs must be frictionless • Multiple (sign

    and spoken) languages • Flexible & forward-compatible categorization
  3. Video Recording // Initialization navigator.getUserMedia({ video: true, audio: false },

    function(stream) { mediaRecorder = new MediaStreamRecorder(stream); video.attr("src", window.URL.createObjectURL(stream)); }); ! // Later var captureSpan = function(milliSeconds) { mediaRecorder.ondataavailable = function(blob) { stop(); setBlob(blob); }; mediaRecorder.start(milliSeconds); }
  4. MediaStream Recording [Constructor (MediaStream stream)] interface MediaRecorder : EventTarget {

    readonly attribute MediaStream stream; readonly attribute RecordingStateEnum state; readonly attribute unsigned long imageWidth; readonly attribute unsigned long imageHeight; readonly attribute DOMString mimeType; attribute EventHandler onrecording; attribute EventHandler onstop; attribute EventHandler ondataavailable; attribute EventHandler onpause; attribute EventHandler onresume; attribute EventHandler onerror; attribute EventHandler onwarning; void record (optional long? timeslice); void stop (); void pause (); void resume (); […] }; http://www.w3.org/TR/mediastream-recording/
 Polyfill: https://github.com/streamproc/MediaStreamRecorder W3C Working Draft
  5. XHR2 over jQuery newEntryForm = $("form#new_entry"); form = new FormData(newEntryForm[0]);

    form.append("entry[video]", window.recorder.getBlob()); $.ajax({ url: newEntryForm.attr("action"), type: newEntryForm.attr("method"), processData: false, contentType: false, data: form });
  6. Video Transcription with class VideosTranscoder include TorqueBox::Messaging::Backgroundable always_background :generate_video !

    def initialize(entry, video_file) @entry = entry @video_file = video_file end ! def transcode! # ... end ! def self.generate_video(entry, video_file) VideosTranscoder.new(entry, video_file).transcode! end end Backgroundable
  7. Searching “Hello” { "query": { "match": { "transcription": "Hello" }

    }, "filter": { "bool": { "must": [ { "term": { "reviewed": true } } ], "must_not": [ { "terms": { "flags": [ "insult", "vulgar", "casual" ] }} ] } } }
  8. …there’s more • popcorn.js: Cross-browser video playback! • Virtus: Declaring

    models & attributes, on steroids • Video Conversion: libav via custom shell wrapper • Bing Translator API for transcription translations