0

A friend of ours is running the Plover software for her closed caption and other reporting work. She is trying to find a way to have this post in real time on a local server for others (Hard of Hearing) to watch in real time (but not allow them to edit) from their tablets or laptops on a LAN.

This would be similar to what Stack Overflow does when editing (but over a LAN rather than on the same machine). I type in an edit box, and it prints below in real time. How is this being done? Is there a place to find this code?

I can help her get the WiFi or Blue-tooth to connect to their systems, I just don't know how to get it to push to them. The reporting machine will be running Ubuntu. If I need to install Apache, PHP for her that's fine and just guide them to a URL.

halfer
  • 19,824
  • 17
  • 99
  • 186
bpross
  • 363
  • 3
  • 11
  • 2
    All this site is doing is onKeyPress, get the text from the textbox, parse the text for formatting and set the innerHTML of a div below. This likely wouldn't work for something like closed captioning though because it updates your screen only, not someone elses as changes are made. If you want to update someone elses screen, you would likely need to either poll quickly with ajax for updates or use a socket connection to push updates. – Jonathan Kuhn Jan 08 '15 at 22:18
  • Ok, Right now she translates steno to english in gedit. If there was a way to split the screen and used VNC or something and only allowed viewing the innerHTML it might be workable. She doesn't need to use gedit, any text box receives the steno to text translation. – bpross Jan 08 '15 at 22:21
  • 1
    In what way will people watch in real-time? Via a web browser, or a desktop application? You mention Apache/PHP but I imagine this is ultimately for video subtitling? How quick does the update speed between typing and reception actually need to be? (a few seconds, or a few minutes? - if genuinely real-time, why? - so we can understand the context/purpose). – halfer Jan 08 '15 at 22:45
  • How does WiFi or Bluetooth fit into this? Do you want to do this just over local area networks? What is a "reporting machine"? – halfer Jan 08 '15 at 22:49
  • She is a stenographer. Her writer sends the steno to an ubuntu laptop that runs Plover. What ever she puts her cursor in (Currently Gedit) it translates the steno to english word. Problem it has no way to allow others to view live as it's running. The software to do this requires windows and is several thousand dollars and allows others to connect to the laptop over it's Wifi, or bluetooth if it has it and they can watch as it's being typed. She would prefer to stick with open source if at all possible. Like Etherpad or real jabber but to not allow others to change or add to the stream. – bpross Jan 09 '15 at 00:32
  • @halfer from their tablets or laptops etc. – bpross Jan 09 '15 at 02:13

1 Answers1

2

It sounds like the Plover software works at a (keyboard) device driver level, and so can be used to enter steno-to-text in any desktop application. Thus I would arrange things this way:

Put Apache on your reporting server, and set up a web application on there which shows a text box. You can use sockets (ideally) or AJAX (as a fallback) to transport your text from a browser to the server. This can then be sent out to any number of clients on a different page, probably via a database as an intermediate store. AJAX requires frequent polls and so is inefficient and slow, but on a LAN with a small number of users it would still be OK. Sockets are better but need a library to implement - take a look here at a PHP example.

Take a look at this answer to understand the different ways a browser and server can communicate (especially the section on HTML5 Websockets). Pusher is mentioned - that makes it really easy, but if you are broadcasting on a LAN it seems pointless to need the internet. I'd do it myself, for what it's worth.

If you want to stick with AJAX, jQuery, MooTools or Prototype is fine. If you want to use sockets there are several libraries that will use sockets first, and then fall back to a variety of technologies (long polling) and then finally AJAX. This will depend mostly on browser support for these various things.

I believe web sockets need a server component for which Apache is generally considered unsuitable. The first link I gave, for the Ratchet library, looks like it has its own listener component. Perhaps a good first step would be to work through the demos, so you can understand the technology and customise it for your needs?

Community
  • 1
  • 1
halfer
  • 19,824
  • 17
  • 99
  • 186