A bomb-defusing robot for people without friends.
Speech detection incorporates pocketsphinx-ruby, a Ruby wrapper for CMUSphinx by Carnegie Mellon University.
Text-to-speech incorporates espeak.
Regardless of your operating system, you’ll need your ruby environment set up first. Specifically, you’ll need Ruby, rbenv, and Bundler gem install bundler
.
Install homebrew.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install rbenv. brew install rbenv
Install bundler. gem install bundler
Next, install pocketsphinx-ruby’s dependencies for voice recognition. (More detailed instructions here: https://github.com/watsonbox/pocketsphinx-ruby#installation)
$ brew tap watsonbox/cmu-sphinx
$ brew install --HEAD watsonbox/cmu-sphinx/cmu-sphinxbase
$ brew install --HEAD watsonbox/cmu-sphinx/cmu-pocketsphinx
Next, install espeak.
$ brew install espeak
Next, make sure that homebrew has linked the ‘portaudio’ keg. Run brew doctor
and check for this error:
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
portaudio
If you see this error, run brew link portaudio
to fix it.
Finally, navigate to the ktane_voice folder and run the following command:
$ bundle
You should now be able to launch Charlie.
$ ruby charlie.rb
Download and install Pocketsphinx, Sphinxbase, and Espeak from the 3 links below.
https://sourceforge.net/projects/cmusphinx/files/pocketsphinx/5prealpha/
https://sourceforge.net/projects/cmusphinx/files/sphinxbase/5prealpha/
http://espeak.sourceforge.net/download.html
Then, navigate to the ktane_voice folder and run the following command:
$ bundle
You should now be able to launch Charlie.
$ ruby charlie.rb
Have fun!! Please leave issue tickets if these instructions don’t work for you! 😃
Each module has a keyword to select it from the main menu, then commands that will give the bot the appropriate data to solve the module.
The bomb will prompt you for bomb variables the first time that they’re necessary. It’s recommended when playing expert bombs, however, to say “charlie bomb check” at the beginning of the game to get them all out of the way.
If Charlie isn’t responding accurately, TURN DOWN YOUR MIC SENSITIVITY. Currently, Charlie is really sensitive to background noise and static. He doesn’t like those at all.
KEYWORD “charlie bomb check”
batteries (0-9) - Number of batteries
digit (0-9) - Last digit of the serial number
vowel (yes/no) - Vowel in the serial number
car (yes/no) - lit CAR indicator
freak (yes/no) - lit FRK indicator
parallel port (yes/no) - Parallel port
defuse wires
((black/blue/red/white/yellow) wire) [repeat]
black wire blue wire white wire
defuse keypads
Say the list of keypads, prefixing each with the word 'key'.
key inkblot, key six, key spaceship, key paragraph
defuse button
Say the color, then the word. If the button is held, say the colour of the stripe.
red abort... (HOLD THE BUTTON. STRIPE COLOUR?)... yellow
defuse simon
Say the light colour sequence, followed by 'done'.
red blue green green yellow done
defuse complicated
Say the combination of attributes (red, blue, star, light) in any order, followed by 'next' to move to the next wire, and done to finish.
red blue star, next, nothing, next, blue, next, red light blue, done
defuse sequence
From top to bottom, say the colour, then the the letter (Alpha, Bravo, Charlie) that it is connected to. Say 'next' to move to the next wire, 'done' to finish. Cut accordingly.
red bravo next, red charlie next, black alpha done
defuse memory
Say 'sequence', followed by the sequence of numbers, starting with the display number and working from left to right. The keyword must be repeated for each round.
defuse memory (ROUND ONE) sequence 3 2 4 3 1
defuse memory (ROUND TWO) sequence 2 2 1 3 4
defuse mazes
With the top-left coordinate as (1,1); the bottom right as (6,6), give the locations requested. The circles can be given in either order. (x, y)
(FIRST CIRCLE?)
1 1
(SECOND CIRCLE?)
1 4
(WHITE SQUARE?)
3 3
(RED TRIANGLE?)
6 6
O * * * * *
* * * * * *
* * X * * *
O * * * * *
* * * * * *
* * * * * A
defuse morse code
Say the combination of 'dot' and 'dash', then 'next'. Really enunciate the difference between 'dot' and 'dash'.
dot dot dot next (S)
The letters can be spoken in any order. If you believe an error was made, 'escape morse code', 'reset morse code', then start over by saying 'defuse morse code'.
defuse words
Say the word in the display. The bot will give you a position. Say the word in that position. The bot will read you a list of words; press the first one you hear that is a button label.
The word is YES.
(MIDDLE-LEFT)
The word is NEXT.
you are -- you are words
first -- first
okay -- okay
c -- c letter
yes -- yes
nothing -- nothing
led -- L E D
they are -- they are words
blank -- blank
read -- read a book
red -- red color
you -- you word
your -- your possessive
you're -- you're contraction
their -- their possessive
_____ -- empty
reed -- reed instrument
leed -- leeds england
they're -- they're contraction
display -- display
says -- says
no -- no
lead -- lead guitar
hold on -- hold on
you are -- you are words
there -- there location
see -- see a movie
cee -- cee word
ready -- ready
first -- first
no -- no
blank -- blank
nothing -- nothing
yes -- yes
what -- what statement
what? -- what question
uhhh -- U H H H
left -- left
right -- right
middle -- middle
okay -- okay
wait -- wait
press -- press
you -- you word
you are -- you are words
your -- your possessive
you're -- you're contraction
u r -- u r letters
u -- u letter
uh huh -- uh huh
uh uh -- staccato
done -- done
next -- next
hold -- hold
sure -- sure
like -- like
KEYWORD
defuse password
USAGE
First, select a column.
Using the Nato Phonetic Alphabet, say all the letters in one column. If a result is found, the bot will read it. If not, it will prompt you for another column.
EXAMPLE
one (selecting column one)
alpha foxtrot whiskey quebec tango echo
KEYWORD
defuse knob
USAGE
From left to right, say the sequence of light combinations.
EXAMPLE
up down both none both down (UP)
On the main menu:
add a strike
remove a strike
reset wire sequences - resets wire sequences
reset morse code - resets morse code
reset password - resets password
reset memory - resets memory
Upon successful completion of these modules, they reset automatically. It isn’t necessary to run these commands unless an error was made.
undo last wire sequence - removes the previous spoken wire sequence command
The bomb is defused. / We did it! - cue a happy success response
The bomb detonated. / The bomb blew up. - cue an upset failure response