Inspiration
We always came across people who are really passionate about coding, but due to some or the other reason, they aren't able to carry on with their coding journey. So we thought of an hack that could help understand the coding and thought of making something more user friendly. So we made a hack named "Talk 2 Code". We wanted computer to code by it's own and as the most spoken language is English also statements in python are normal English, so we started working on speech recognition with python.
What it does
The working of our hack is simple. First of all a Home Page appears and it gives user option of Login and Sign-up. If the user is new to it, they can register by signing up and late they can login with their credentials. After successful login a new window appears where we can speak what we want to be coded. For that we have kept a Speak Now button, pressing that we can take the input from the user via speech. After speaking the required sentences by the user, the python statements are generated in a separate output block beside to show the user. After the user finishes speaking what he wants to code, a .py file is generated that we can run to successfully get the output of program generated by our hack.
How I built it
Basically we knew the string parsings from python and initiallty we found that the sentence we speak and the python statements were much similar and they just needed a bit modifications in syntax that can be done by string parsing. Than we learnt more about speech recognition from using Google API and so we implemented that in this project. Than thought that a UI is needed for better User Experience so learnt more about tkinter and created the UI.
Challenges I ran into
Actually, we were on a different hack initially, but due to some reason, it didn't worked out so we need to switch with our idea and with less than 8 hours left for hacking to end we started with this idea from scratch so did in less time. We faced challenges with MongoDB Atlas and its connection to Python.
Accomplishments that I'm proud of
We did this hack in a really very less time. Also now we don't need to type single letter and the whole program is written. It generates .py file automatically.
What I learned
We learned a lot of things, we learned:
- MongoDB and its connection with Python
- Speech recognition with Google API
- UI with tkinter and also of-course
- The time management.
What's next for Talk To Code
We are not stopping here, in such a less time we did a lot and we are sure in coming days we would do great. We are going to add more functionality to it such as below:
- Add more languages like javascript, java, c++, html, etc.
- Generate files as per the language chosen.
- Adding auto suggestions.
- Better UI.
- Mobile Applications and Web App.
- Collabration with coding platforms
This was the story with our hack, it was indeed a great experience! Thanks for the opportunity. Stay Safe!
Built With
- amazon-web-services
- googleapiforspeechrecognition
- jupyter
- mongodbatlas
- python3.7
- server
- tkinter

Log in or sign up for Devpost to join the conversation.