Giter Site home page Giter Site logo

vatsal-elixir / wifi-xlation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sblandford/wifi-xlation

0.0 0.0 0.0 383 KB

A WebRTC-based audio simultaneous translation system for mobile devices in venues

License: MIT License

Shell 19.85% JavaScript 61.13% CSS 5.29% HTML 12.84% Dockerfile 0.89%

wifi-xlation's Introduction

WiFi-xlation

Venue WiFi Audio Translation for mobile devices

A simultaneous audio translation system for venues using local WiFi and the web browser of mobile devices based on Web RTC. The server is packaged in a Docker utilising the the Janus WebRTC Server, Nginx web server and the Ubuntu Lunar image.

Any web browser can be used to send or receive the translation. The UI currently targets mobile devices to provide a simple, clear interface for language selection and reception.

A QR code can be popped up to share the translation URL around the venue.

A simple configuration file, languages.conf, contains the names of the language channels and corresponding passwords for the translators.

It is also possible to send audio to a channel using Opus over RTP, for example, from ffmpeg. This way, one channel can then be used to relay the on-stage sound to translators in different rooms of the venue.

Multiple translators can use the same channel simultaneously. This is so that they can hand over to each other without breaking the transmission. The translators on the same channel will be able to hear each other.

Building

docker build -t wifi-xlation .

Running

A helper bash script, xlationctl.sh, is provided to simplify, or just print out, common Docker commands for this application.

To run the application in localhost (WebRTC won't work beyond localhost without SSL):

./xlationctl.sh start --daemon --host

This will make the application available on http://localhost. If port 80 is already occupied on your host then this port can be shifted to, say, 8080:

./xlationctl.sh start --daemon --portshift 8000

To see what Docker command would be used for any combination of options just run with the --dummy switch. This will just print the Docker command rather than actually running it.

For the full range of options see:

./xlationctl.sh --help

Test audio

For some test tones just use the bash script provided:

./test-tones.sh start

To stop them:

./test-tones.sh stop

Either the --host option or the --rtpforward option must be used with xlationctl.sh for the test tones to be received by Janus and be audible.

SSL

The SSL certificates can be supplied from files in a mounted directory or from an AWS S3 path. I have had some success using the certbot-lambda project to keep a current LetsEncrypt certificate on S3.

Janus/Docker issues

To best results either run this docker with network=host or using macvlan. This useful video explains the issues : Alessandro Amirante - Janus &Docker: friends or foe?

Statistics

There is a statistics page available on /stats.html that will show which streams are active and how many listeners are connected.

Microphone icon

Normally, there is a microphone icon visible in the player to activate the translation controls for the translators. Probably, most clients only want to listen to the translation rather than to translate. This icon can be made visible or hidden by visiting /xlator.html. See the docker variables documentation to set the default.

Further documentation

Docker Image

Also available on Dockerhub

wifi-xlation's People

Contributors

sblandford avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.