Inspiration
The desire to code without actually needing to be at a computer
What it does
Takes a spoken description of a function, and converts it into code. Currently we support Ruby, Python and Java (as other languages have less orthodox sounding names which tripped up the API a little in testing)
For instance, the following instruction:
declare a function in ruby called print the arguments which takes one argument, an integer, and returns an integer, that prints the first argument
will product the following output:
def print_the_arguments(x0) do
puts x0.inspect
end
How we built it
We took a speech transcript generated though the Deepgram api (we wrote Scala.JS for the Deepgram JavaScript SDK to do this) & then parsed the text & searched for patterns describing the functions to be generated and what language to generate them in.
Challenges we ran into
Coding while tired = mistakes - also dealing with unexpected data from the API was much harder than expected (ie. we expected "c" - as in the programming language - to be returned as see or sea, however it was sometimes also returned as "z" and "she", which made detecting when a user was targeting C much harder, and that's without accounting for any other variations which may have sprung up)
Accomplishments that we're proud of
Compiling human-friendly language to a transferable base which can easily be transferred to most imperative programming languages
What we learned
A lot about APIs and user focused design, as this the largest human-interaction & web focused project any of us have undertaken - also how to enjoy ourselves at hackathons
What's next for Speaking in Code
To the moon :)
Built With
- deepgram
- scala.js
Log in or sign up for Devpost to join the conversation.