diff --git a/README.md b/README.md index 70bad0bc..710eae57 100644 --- a/README.md +++ b/README.md @@ -61,9 +61,11 @@ This project is coded and organized like this: │ ├── commbase-llm-google-gemini-p │ ├── commbase-llm-meta-llama-p │ ├── commbase-llm-openai-gpt-p +│ ├── commbase-recorder-transmitter-b +│ ├── commbase-recorder-transmitter-s │ ├── commbase-stt-whisper-proactive-p │ │ └── examples -│ ├── commbase-stt-whisper-reactive-remote-p +│ ├── commbase-stt-whisper-reactive-p │ │ ├── client_data │ │ └── examples │ ├── commbase-tts-gTTS diff --git a/bundles/commbase-data-exchange/server/client_data/json_1.json b/bundles/commbase-data-exchange/server/client_data/json_1.json index 220578cb..bcb3e820 100644 --- a/bundles/commbase-data-exchange/server/client_data/json_1.json +++ b/bundles/commbase-data-exchange/server/client_data/json_1.json @@ -1 +1 @@ -{"messages": [{"control": "stop_previous_command"}, {"current_request": "Okay accept."}, {"previous_request": "Okay accept."}, {"current_response": ""}, {"runtime": ""}, {"source_code_display": ""}, {"source_code": ""}]} \ No newline at end of file +{"messages": [{"control": ""}, {"current_request": "sto"}, {"previous_request": "sto"}, {"current_response": ""}, {"runtime": ""}, {"source_code_display": ""}, {"source_code": ""}]} \ No newline at end of file diff --git a/bundles/commbase-recorder-transmitter-b/README.md b/bundles/commbase-recorder-transmitter-b/README.md new file mode 100644 index 00000000..69c4300c --- /dev/null +++ b/bundles/commbase-recorder-transmitter-b/README.md @@ -0,0 +1 @@ +# commbase-recorder-transmitter-b \ No newline at end of file diff --git a/bundles/commbase-stt-whisper-reactive-p/rec-comm_for_bash/rec-comm.sh b/bundles/commbase-recorder-transmitter-b/reccomm.sh similarity index 98% rename from bundles/commbase-stt-whisper-reactive-p/rec-comm_for_bash/rec-comm.sh rename to bundles/commbase-recorder-transmitter-b/reccomm.sh index 8df2c4f5..72addc76 100755 --- a/bundles/commbase-stt-whisper-reactive-p/rec-comm_for_bash/rec-comm.sh +++ b/bundles/commbase-recorder-transmitter-b/reccomm.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash ################################################################################ -# commbase-stt-whisper-reactive-p # +# commbase-recorder-transmitter-b # # # # A reactive version of STT ASR (Automatic Speech Recognition) engine. # # # @@ -30,11 +30,11 @@ # along with this program; if not, write to the Free Software # # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# rec-comm.sh +# reccomm.sh # Records audio when specific key is pressed, using the arecord command. Sends # the recorded audio file to a remote host using scp when a specific key is # pressed again. -# Requires the packages already installed: +# Required packages: # alsa-utils # openssh-client # openssh server diff --git a/bundles/commbase-recorder-transmitter-s/README.md b/bundles/commbase-recorder-transmitter-s/README.md new file mode 100644 index 00000000..4c01483f --- /dev/null +++ b/bundles/commbase-recorder-transmitter-s/README.md @@ -0,0 +1 @@ +# commbase-recorder-transmitter-s \ No newline at end of file diff --git a/bundles/commbase-stt-whisper-reactive-p/rec-comm_for_sh/rec-comm.sh b/bundles/commbase-recorder-transmitter-s/reccomm.sh similarity index 97% rename from bundles/commbase-stt-whisper-reactive-p/rec-comm_for_sh/rec-comm.sh rename to bundles/commbase-recorder-transmitter-s/reccomm.sh index 0bc33006..0d740bfe 100755 --- a/bundles/commbase-stt-whisper-reactive-p/rec-comm_for_sh/rec-comm.sh +++ b/bundles/commbase-recorder-transmitter-s/reccomm.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh ################################################################################ -# commbase-stt-whisper-reactive-p # +# commbase-recorder-transmitter-s # # # # A reactive version of STT ASR (Automatic Speech Recognition) engine. # # # @@ -30,11 +30,11 @@ # along with this program; if not, write to the Free Software # # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# rec-comm.sh +# recccom.sh # Records audio when specific key is pressed, using the arecord command. Sends # the recorded audio file to a remote host using scp when a specific key is # pressed again. -# Requires the packages already installed: +# Required packages: # alsa-utils # openssh-client # openssh server diff --git a/bundles/commbase-stt-whisper-reactive-p/client_data/recording.wav b/bundles/commbase-stt-whisper-reactive-p/client_data/recording.wav index c1ca88f1..8dbde954 100644 Binary files a/bundles/commbase-stt-whisper-reactive-p/client_data/recording.wav and b/bundles/commbase-stt-whisper-reactive-p/client_data/recording.wav differ diff --git a/bundles/libcommbase/libcommbase/routines/text_animation.sh b/bundles/libcommbase/libcommbase/routines/text_animation.sh index 0e33f199..bf9eb752 100644 --- a/bundles/libcommbase/libcommbase/routines/text_animation.sh +++ b/bundles/libcommbase/libcommbase/routines/text_animation.sh @@ -37,24 +37,24 @@ # animation <"text"> animate_text() { - local text="$1" - local delay="$2" + local text="$1" + local delay="$2" - while true; do - clear - for ((i = 0; i < ${#text}; i++)); do - echo -n "${text:$i:1}" - sleep "$delay" - done - clear - echo + while true; do + clear + for ((i = 0; i < ${#text}; i++)); do + echo -n "${text:$i:1}" + sleep "$delay" done + clear + echo + done } # Check if both text and delay are provided as arguments if [ $# -ne 2 ]; then - echo "Usage: $0 " - exit 1 + echo "Usage: $0 " + exit 1 fi text="$1" diff --git a/data/.chat_log.txt b/data/.chat_log.txt index 38e44a1b..4f0eb7a0 100644 --- a/data/.chat_log.txt +++ b/data/.chat_log.txt @@ -15,3 +15,22 @@ 🧑 END USER: 🧑 END USER: I have changed the parts to the engine. 🧑 END USER: Press a key to record. +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: +🧑 END USER: diff --git a/data/.messages.json b/data/.messages.json index 70ff62ac..7ef26b3e 100644 --- a/data/.messages.json +++ b/data/.messages.json @@ -1 +1 @@ -{"messages":[{"control":"stop_previous_command"},{"current_request":"Okay accept."},{"previous_request":"Okay accept."},{"current_response":""},{"runtime":""},{"source_code_display":""},{"source_code":""}]} +{"messages":[{"control":""},{"current_request":"sto"},{"previous_request":"sto"},{"current_response":""},{"runtime":""},{"source_code_display":""},{"source_code":""}]} diff --git a/src/app.sh b/src/app.sh index 9516ab8a..4d811b42 100644 --- a/src/app.sh +++ b/src/app.sh @@ -75,19 +75,15 @@ app() { # Pane 1 # On window 0, select pane 1, open or create the chatroom file (tmux select-pane -t 1 && tmux send-keys " touch $COMMBASE_APP_DIR$CHAT_LOG_FILE" C-m && sleep $time); - # Clear the screen, and set the prompt to an empty string - (tmux select-pane -t 1 && tmux send-keys " clear && PS1=""" C-m); # Run tail_chat_log and then press the enter key - (tmux select-pane -t 1 && tmux send-keys " bash $tail_chat_log" C-m && sleep $time); + (tmux select-pane -t 1 && tmux send-keys " clear; bash $tail_chat_log" C-m && sleep $time); # Pane 3 # On window 0, select pane 3, activate the conda environment if it exists, # send the enter key, and sleep. (tmux select-pane -t 3 && tmux send-keys " conda activate $CONDA_ENV_NAME_IF_EXISTS" C-m && sleep $time); - # Clear the screen, and set the prompt to an empty string - (tmux select-pane -t 3 && tmux send-keys " clear && PS1=""" C-m); # Run commbase-data-exchange server and then press enter - (tmux select-pane -t 3 && tmux send-keys " $PYTHON_ENV_VERSION $COMMBASE_DATA_EXCHANGE_SERVER_CONNECTION_FILE_PATH" C-m && sleep $time); + (tmux select-pane -t 3 && tmux send-keys " clear; $PYTHON_ENV_VERSION $COMMBASE_DATA_EXCHANGE_SERVER_CONNECTION_FILE_PATH" C-m && sleep $time); # Check the connection to the server before starting the client (check_data_exchange_server_connection) @@ -95,17 +91,15 @@ app() { # On window 0, select pane 2, activate the conda environment if it exists, # send the enter key, and sleep. (tmux select-pane -t 2 && tmux send-keys " conda activate $CONDA_ENV_NAME_IF_EXISTS" C-m && sleep $time); - # Clear the screen, and set the prompt to an empty string - (tmux select-pane -t 2 && tmux send-keys " clear && PS1=""" C-m); # Run commbase-data-exchange client and then press enter - (tmux select-pane -t 2 && tmux send-keys " $PYTHON_ENV_VERSION $COMMBASE_DATA_EXCHANGE_CLIENT_CONNECTION_FILE_PATH" C-m && sleep $time); + (tmux select-pane -t 2 && tmux send-keys " clear; $PYTHON_ENV_VERSION $COMMBASE_DATA_EXCHANGE_CLIENT_CONNECTION_FILE_PATH" C-m && sleep $time); # Pane 4 # On window 0, select pane 4, activate the conda environment if it exists, # send the enter key, and sleep. (tmux select-pane -t 4 && tmux send-keys " conda activate $CONDA_ENV_NAME_IF_EXISTS" C-m && sleep $time); # Run the STT_ENGINE_STRING and then press the enter - (tmux select-pane -t 4 && tmux send-keys " cpulimit --limit=$STT_PROCESS_CPU_LIMIT_PERCENTAGE -- $STT_ENGINE_STRING" C-m && sleep $time); + (tmux select-pane -t 4 && tmux send-keys " clear; cpulimit --limit=$STT_PROCESS_CPU_LIMIT_PERCENTAGE -- $STT_ENGINE_STRING" C-m && sleep $time); # Clear the screen, and set the prompt to an empty string (tmux select-pane -t 4 && tmux send-keys " clear && PS1=""" C-m); @@ -116,19 +110,15 @@ app() { # On window 0, select pane 5, activate the conda environment if it exists, # send the enter key, and sleep. (tmux select-pane -t 5 && tmux send-keys " conda activate $CONDA_ENV_NAME_IF_EXISTS" C-m && sleep $time); - # Clear the screen, and set the prompt to an empty string - (tmux select-pane -t 5 && tmux send-keys " cd $COMMBASE_APP_DIR ; clear && PS1=""" C-m); # Run text_animation and then press enter - (tmux select-pane -t 5 && tmux send-keys " bash $text_animation 'Commbase' 0.5" C-m && sleep $time); + (tmux select-pane -t 5 && tmux send-keys " clear; bash $text_animation 'Commbase' 0.5" C-m && sleep $time); # Pane 6 # On window 0, select pane 6, activate the conda environment if it exists, # send the enter key, and sleep. (tmux select-pane -t 6 && tmux send-keys " conda activate $CONDA_ENV_NAME_IF_EXISTS" C-m && sleep $time); - # Clear the screen, and set the prompt to an empty string - (tmux select-pane -t 6 && tmux send-keys " cd $COMMBASE_APP_DIR ; clear && PS1=""" C-m); # Run alsamixer and then press enter - (tmux select-pane -t 6 && tmux send-keys " alsamixer --view=capture" C-m); + (tmux select-pane -t 6 && tmux send-keys " clear; alsamixer --view=capture" C-m); # In this section, activate/deactivate or add custom extra windows