A combination of Docker services to provide a conversational agent (e.g. one embodied by a Pepper humanoid social robot)with conversational abilities:
- Speech Recognition → Whisper
- Natural Language Understanding → Rasa
- Speech Synthesis → Mimic 3
- Web GUI → PHP
(Deprecated: Pepper Robot (NaoQi Python))
- Make sure python 3.8 is installed, as it is needed for Rasa
- MacOS:
brew install [email protected]
- MacOS:
- Install Rasa:
python3.8 -m pip install rasa
- Train Rasa Model:
sudo rasa train
- Run Rasa Actions server:
rasa run actions
- Run Rasa Model server in CLI:
rm -rf models/;clear;rasa train --domain domain.yml --config config.yml;rasa run --enable-api --cors "*" --debug -p 5005
- Run Rasa Actions server:
- Make sure you have Docker installed and running
- Start the containers with
start-servers.sh
- Validate that all containers are running with
validate-containers.sh
Example:
sudo docker exec -it conversational-agent-server /bin/bash
Trying Rasa locally without Docker
export SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True
sudo python3.11 -m pip install scikit-learn dask --break-system-packages --ignore-requires-python
Curl Rasa Test
curl --request POST http://localhost:5005/webhooks/rest/webhook --header 'content-type: application/json' --data '{ }"message": "hi" }'
- Create user account
curl -X 'POST' \
'http://localhost:9001/api/v1/users/' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"email": "[email protected]",
"username": "whisper",
"password": "whisper"
}'
- Get api token
curl -X 'POST' \
'http://localhost:9001/api/v1/users/get_token' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"email": "[email protected]",
"password": "whisper"
}'