Inspiration

The Babel Fish from Hitchhiker's Guide to the Galaxy. The babel fish is a fish-looking device that you can stick in your ear to translate any alien language to your language. Our team thought it would be awesome to bring this to real life.

What it does

The babel fish in the book/movie takes in the audio and somehow translates it to another language. Sadly, computers don't do this, so we had to do it in a programmatic way. How our device works is the user will use their phone, which is connected to the raspberry pi, and record the audio they want to be translated. Once they hit the stop recording button, the audio recording is sent to the raspberry pi for translation.

On the raspberry pi, we have a python script, that uses the AssemblyAI API to get the transcript of the audio, which then passes this to the translation function. This translation function uses a python library called Deep-Translator, which allows the usage of any translation platform. For our python script, we decided to go with Google Translate since it is the most trusted. Once the text is translated, it is sent to the app and then

How we built it

For the app interface, we decided to go with Flutter due to its idea of write once, build to many. Nyle could now build the same code to iOS and John could build to android. We required some dependencies with the flutter. How the app would work is that the user would hit the record button, which would start recording an audio file in the format .wav. Once the user hits the stop button, the audio recording is saved to the phone and sent to the raspberry pi.

For the backend, we used a raspberry pi to run a python script that can take in audio and translate it. So, the raspberry pi will listen for the phone and once it receives the audio file, it will run the python code. How the code works is it sends the audio file to the AssemblyAI server. Once it is there, I retrieve the id for that audio and send a request for a transcript. Once I submit an initial request, the code runs a while loop that checks the status of the transcript until it is set to "complete", which then sends that text to the translate function. For the translate function, we used a library that allows us to use google translate services, and translates to the target language.

Challenges we ran into

One main issue we had was using the raspberry pi. Due to it having an outdated processor architecture, we were unable to set up a node server to listen for the phone. This issue is the reason why we were not able to actually send an audio recording to the raspberry pi.

Another issue that we had was dealing with SDK version conflicts. For the recording part of the app, we were going to use a library called "sound_lite". However, we were getting errors with using this library and were running out of time when trying to fix it.

Accomplishments that we're proud of

For the raspberry pi, we're proud to be able to translate to all supported languages off of one single audio file. Since we are new to hackathons and have a lack of experience, learning how to do HTTP requests for the first time successfully was quite an accomplishment.

Another thing we're proud of is learning how to use dart and flutter while working on our project. Although it is made to be easy, it can quite frustrating to use and definitely takes a lot of patience. So, the fact that we have a tangible app we can show is something we're very proud of.

For the CAD designs of the project, we are quite proud of what we were able to do. Being able to give a detailed design, showing where the raspberry pi would go, and relearning the software definitely took some effort that we are proud to present.

What we learned

For the back end, we learned how to submit HTTP requests, mainly how to send get and post requests, and how to use the response from those requests.

For the app, we were able to learn a sufficient amount of dart in order to create the GUI of the app interface.

For the CAD designs, we had to relearn how to use Inventor in order to create a well developed product to communicate our idea, and even possibly build.

What's next for Babel Fish

The Babel Fish team definitely plans on continuing this project. The first step would be to use a newer raspberry pi, possibly the raspberry pi 4. This will allow for faster run time of the python script and allow us to setup a node server to listen to the app.

Another thing would be to continue working on the app, taking time to fix the problems with the library we would like to use in order to actually have the app record audio.

After these two things are done, we would like to make an actual prototype, which would mean 3D printing out the design and buying the battery pack to make the prototype mobile.

Built With

Share this project:

Updates