diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2014-05-27 23:25:31 -0700 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2014-05-27 23:26:17 -0700 |
| commit | c1a49a4b925abfd10f4a6faa85d8afe9689bdd4c (patch) | |
| tree | fbfdab168ec5cfde4a26c09795af5501420ac76d | |
| parent | 77f96c260f7232cefc77054f2d2bb938072b3c57 (diff) | |
| download | jasper-client-c1a49a4b925abfd10f4a6faa85d8afe9689bdd4c.tar.gz jasper-client-c1a49a4b925abfd10f4a6faa85d8afe9689bdd4c.zip | |
moved static assets to separate folder
| -rwxr-xr-x | boot/boot.py | 8 | ||||
| -rw-r--r-- | client/mic.py | 6 | ||||
| -rw-r--r-- | client/modules/Joke.py | 2 | ||||
| -rw-r--r-- | static/audio/beep_hi.wav (renamed from client/beep_hi.wav) | bin | 37656 -> 37656 bytes | |||
| -rw-r--r-- | static/audio/beep_lo.wav (renamed from client/beep_lo.wav) | bin | 37100 -> 37100 bytes | |||
| -rw-r--r-- | static/audio/say.wav (renamed from boot/say.wav) | bin | 151944 -> 151944 bytes | |||
| -rw-r--r-- | static/text/JOKES.txt (renamed from client/JOKES.txt) | 0 |
7 files changed, 8 insertions, 8 deletions
diff --git a/boot/boot.py b/boot/boot.py index ebe6b35..b042004 100755 --- a/boot/boot.py +++ b/boot/boot.py @@ -6,9 +6,9 @@ import yaml import vocabcompiler -def say(phrase, OPTIONS = " -vdefault+m3 -p 40 -s 160 --stdout > say.wav"): +def say(phrase, OPTIONS = " -vdefault+m3 -p 40 -s 160 --stdout > ../static/audio/say.wav"): os.system("espeak " + json.dumps(phrase) + OPTIONS) - os.system("aplay -D hw:1,0 say.wav") + os.system("aplay -D hw:1,0 ../static/audio/say.wav") def configure(): try: @@ -20,9 +20,9 @@ def configure(): print "STARTING CLIENT PROGRAM" os.system("/home/pi/jasper/client/start.sh &") - + except: - + print "COULD NOT CONNECT TO NETWORK" say("Hello, I could not connect to a network. Please read the documentation to configure your Raspberry Pi.") os.system("sudo shutdown -r now") 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 = "" diff --git a/client/beep_hi.wav b/static/audio/beep_hi.wav Binary files differindex 1d6593f..1d6593f 100644 --- a/client/beep_hi.wav +++ b/static/audio/beep_hi.wav diff --git a/client/beep_lo.wav b/static/audio/beep_lo.wav Binary files differindex 0afb29a..0afb29a 100644 --- a/client/beep_lo.wav +++ b/static/audio/beep_lo.wav diff --git a/boot/say.wav b/static/audio/say.wav Binary files differindex d27c7dc..d27c7dc 100644 --- a/boot/say.wav +++ b/static/audio/say.wav diff --git a/client/JOKES.txt b/static/text/JOKES.txt index adfb0e3..adfb0e3 100644 --- a/client/JOKES.txt +++ b/static/text/JOKES.txt |
