Skip to content

Commit e8379b8

Browse files
committed
Testing
1 parent a2adab3 commit e8379b8

File tree

6 files changed

+22
-11
lines changed

6 files changed

+22
-11
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,5 @@ viam_sdk-0.15.0.dist-info/
155155
yaml/
156156
myvenv/
157157
.circleci/
158-
.vscode
158+
.vscode
159+
myenv

install.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,12 @@
2424
# OpenCV
2525
# sudo apt-get install libatlas-base-dev
2626

27+
# CREATE VIRTUAL ENVIRONMENT
28+
python3 -m venv myenv
29+
source myenv/bin/activate
30+
2731
# INSTALL ALL PYTHON DEPENDENCIES
28-
python3 -m pip install -r requirements.txt --break-system-packages
32+
python3 -m pip install -r requirements.txt
2933

3034
# Activate other scripts
3135
chmod 777 startup.sh

main.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
# from modules.speechinput import SpeechInput
3636
from modules.arduinoserial import ArduinoSerial
3737
from modules.neopx import NeoPx
38-
from modules.tts import TTS
39-
from modules.openaichat import OpenAiChat
38+
# from modules.tts import TTS
39+
# from modules.openaichat import OpenAiChat
4040
from modules.personality import Personality
4141
# from modules.battery import Battery
4242
from modules.braillespeak import Braillespeak
@@ -112,8 +112,8 @@ def main():
112112
# power = Power(Config.POWER_ENABLE_PIN)
113113

114114
neopx = NeoPx(Config.get('neopixel','count'))
115-
tts = TTS(service=Config.get('tts','service'), voice_id=Config.get('tts','voice_id'))
116-
openaichat = OpenAiChat()
115+
# tts = TTS(service=Config.get('tts','service'), voice_id=Config.get('tts','voice_id'))
116+
#openaichat = OpenAiChat()
117117

118118
if Config.get('motion','pin') != '':
119119
motion = Sensor(Config.get('motion','pin'))
@@ -165,7 +165,7 @@ def main():
165165
# sleep(1) # @todo is this needed?
166166
# @todo this is throwing errors: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
167167

168-
speech = SpeechInput()
168+
# speech = SpeechInput()
169169
# Output
170170
# if Config.get('buzzer', 'pin') != '':
171171
# speak = Braillespeak(Config.get('buzzer', 'pin'), duration=80/1000)

modules/openaichat.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ def completion(self, input):
3030
)
3131

3232
pub.sendMessage('log', msg='[OpenAIChat] ' + completion.choices[0].message.content)
33-
# print(completion.choices[0].message.content)
33+
print(completion.choices[0].message.content)
3434
output = re.sub(r'[^\w\s]','',completion.choices[0].message.content).lower()
35-
# print(output)
35+
print(output)
3636
if output == 'yes':
3737
# Nod head if answer is just 'yes'
3838
pub.sendMessage('animate', action='head_nod')

requirements.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ pypubsub
77
gpiozero
88

99
# Speech recognition
10-
# SpeechRecognition
10+
SpeechRecognition
1111
#pocketsphinx
1212

1313
# Chat bot
14+
openai
15+
elevenlabs
1416
#Cython
1517
#chatterbot==1.0.2
1618
#chatterbot_corpus
@@ -43,4 +45,6 @@ pygame
4345

4446
nltk
4547

46-
# viam-sdk[mlmodel]
48+
# viam-sdk[mlmodel]
49+
50+
pigpio

startup.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
sudo pkill -f /home/archie/modular-biped/main.py
33
# sudo modprobe bcm2835-v4l2 # Enable camera
44
sudo pigpiod # GPIO - is used
5+
6+
source myenv/bin/activate
57
python3 /home/archie/modular-biped/main.py
68

0 commit comments

Comments
 (0)