From c1a49a4b925abfd10f4a6faa85d8afe9689bdd4c Mon Sep 17 00:00:00 2001 From: schneefux Date: Tue, 27 May 2014 23:25:31 -0700 Subject: moved static assets to separate folder --- client/JOKES.txt | 47 ----------------------------------------------- client/beep_hi.wav | Bin 37656 -> 0 bytes client/beep_lo.wav | Bin 37100 -> 0 bytes client/mic.py | 6 +++--- client/modules/Joke.py | 2 +- 5 files changed, 4 insertions(+), 51 deletions(-) delete mode 100644 client/JOKES.txt delete mode 100644 client/beep_hi.wav delete mode 100644 client/beep_lo.wav (limited to 'client') diff --git a/client/JOKES.txt b/client/JOKES.txt deleted file mode 100644 index adfb0e3..0000000 --- a/client/JOKES.txt +++ /dev/null @@ -1,47 +0,0 @@ -little old lady -wow... I didn't know you could yodel... get it... because it sounded like you were yodeling - -oink oink -make up your mind... are you a pig or an owl... get it... because an owl goes who but a pig goes oink... oink - -cows go -no... cows go moo... didn't you know - -jarvis -jarvis... it's me you idiot - -me -no... seriously... it's just me... I was telling a knock knock joke ha ha ha - -madam -my damn foot got stuck in the door, so open it he he he... but actually... I think I hurt my foot - -doris -door is locked... that's why I'm knocking, you idiot - -cash -no thanks... but I would like a peanut instead... get it? because you said cashew... ha ha ha - -orange -orange you glad I am your friend - -alex -I'll ask the questions around here, thank you - -viper -viper nose... it's running - -canoe -can you scratch my back... it itches - -pete -pizza delivery guy... you idiot - -doctor -that is the best show ever - -arizona -arizona room for only one of us in this room - -spider -in spider what everyone says, I still feel like a human diff --git a/client/beep_hi.wav b/client/beep_hi.wav deleted file mode 100644 index 1d6593f..0000000 Binary files a/client/beep_hi.wav and /dev/null differ diff --git a/client/beep_lo.wav b/client/beep_lo.wav deleted file mode 100644 index 0afb29a..0000000 Binary files a/client/beep_lo.wav and /dev/null differ diff --git a/client/mic.py b/client/mic.py index 71f49ab..d746ba1 100644 --- a/client/mic.py +++ b/client/mic.py @@ -237,7 +237,7 @@ class Mic: if THRESHOLD == None: THRESHOLD = self.fetchThreshold() - os.system("aplay -D hw:1,0 beep_hi.wav") + os.system("aplay -D hw:1,0 ../static/audio/beep_hi.wav") # prepare recording stream audio = pyaudio.PyAudio() @@ -267,7 +267,7 @@ class Mic: if average < THRESHOLD * 0.8: break - os.system("aplay -D hw:1,0 beep_lo.wav") + os.system("aplay -D hw:1,0 ../static/audio/beep_lo.wav") # save the audio data stream.stop_stream() @@ -287,7 +287,7 @@ class Mic: return self.transcribe(AUDIO_FILE, MUSIC=True) return self.transcribe(AUDIO_FILE) - + def say(self, phrase, OPTIONS=" -vdefault+m3 -p 40 -s 160 --stdout > say.wav"): # alter phrase before speaking phrase = alteration.clean(phrase) diff --git a/client/modules/Joke.py b/client/modules/Joke.py index 454280c..52b3eb9 100644 --- a/client/modules/Joke.py +++ b/client/modules/Joke.py @@ -4,7 +4,7 @@ import re WORDS = ["JOKE", "KNOCK KNOCK"] -def getRandomJoke(filename="JOKES.txt"): +def getRandomJoke(filename="../static/text/JOKES.txt"): jokeFile = open(filename, "r") jokes = [] start = "" -- cgit v1.3.1