Inspiration

As students, we've found that sending documents and images can be frustratingly difficult. The multi-step process and multi-platform ways to get files often lead to messy results. Additionally, there are many situations where files need to be transferred but there is no bluetooth or internet connectivity (especially in developing countries). We found that sound could be an underused and better way to transfer information for these initial use cases as well as in a variety of other situations that were revealed to us as we built.

What it does

wavelength uses sound to transmit any kind of file. It does so by assigning frequencies to a system of characters, and using sound frequencies to represent those characters and then turning the sound to characters on a different device. This allows for multiple people to efficiently receive data from the same source/sound, a "one-to-many" system that is far more efficient than adding a large group of people to an email chain or google doc. Internet or bluetooth connectivity are not required for wavelength to work. We have also used to Nexmo API to allow users to send texts specifying a file, which our software turns to sound and transmits on a call to the desired target. This allows users who aren't close to each other to send files, with or without an internet connection.

How we built it

Upon starting to build Wavelength, we first had to determine how to encode and decode our files consistently. We chose base-64 encoding as an effective answer to this, since a) there was enough bandwidth in the frequencies we intended to use to match 64 characters and b) files could be easily downloaded as a base-64-encoded string (along with MIME type and file name). Wavelength was completely built as a client-side web application, in vanilla JavaScript. We tapped into a good part of the WebAudio API to create our oscillation frequencies (which varied in increments of 50 from 1900-5200 Hz) as well as to process the microphone input to capture what frequency was being played on the receiving end. We processed our microphone input with a "highshelf" BiquadFilter to boost the gain of high-frequency sounds and a Fast Fourier Transform (using AnalyserNode) to deconstruct the frequencies into an array that we used to find the frequency played. On the server side (where we use Node.js to interface with Nexmo Voice API, allowing you to send files through a phone call), the WebAudio spec is not natively supported. We used a couple modules to produce the same oscillation frequencies (although we found differences between implementations of OscillationNode in Node and Chrome), as well as stream buffers to capture the raw PCM audio data and export it to a WAV file.

Challenges we ran into

A major challenge was accuracy, as we were carrying large, complex sets of data over the low-bandwidth medium of sound. Many times we changed the encoding frequencies we used because we found that many of them were too indistinguishable for an average-quality microphone to detect difference. Another issue we encountered with accuracy was a timing issue, since we had initially planned to begin the transmission with a handshake that synced the sender's and receiver's clients. Although not optimal (since it results in a lengthier transmission), we decided to include a 1950 Hz end-of-character frequency that indicated more explicitly the boundaries between characters and their frequencies.

Accomplishments that we're proud of

No one on our team has had experience in digital signal processing or using WebAudio, but we were able to successfully create a system for encoding and transmitting files through sound, implement the system in a language that only one of four teammates had experience with (JavaScript), and send actual files using the ridiculous beeps coming from our headphones.

Our team worked very well together, despite only two members working together before the event. We were able to delegate work well and discuss without destructive disagreement.

What's next for wavelength

We're super excited to apply what we've made to industries that would greatly benefit. We see huge potential in being able to broadcast text or images from one to many, especially in scenarios where a teacher or leader wants to easily send information to many people. The ability to transfer files without the internet also makes wavelength very useful to people in developing countries who own computers but have spotty internet connection. In the security industry, wavelength could be used for 2 factor authentication.

Built With

Share this project:
×

Updates