mirror of
https://github.com/Project-Babble/ProjectBabble.git
synced 2026-11-20 17:11:16 -08:00
Merge branch 'main' into LordOfDragons-vivefacialtracker
This commit is contained in:
231 files changed
+142
-25205
No files matched your search
@@ -0,0 +1,3 @@
|
||||
[submodule "Babble-Unity-Demo"]
|
||||
path = Babble-Unity-Demo
|
||||
url = https://github.com/dfgHiatus/Babble-Unity-Demo
|
||||
Submodule
+1
Submodule Babble-Unity-Demo added at aaca0585b9.
@@ -44,6 +44,7 @@ if is_nt:
|
||||
winmm = windll.winmm
|
||||
except OSError:
|
||||
print(f'\033[91m[{lang._instance.get_string("log.error")}] {lang._instance.get_string("error.winmm")}.\033[0m')
|
||||
|
||||
os.system("color") # init ANSI color
|
||||
|
||||
# Random environment variable to speed up webcam opening on the MSMF backend.
|
||||
|
||||
+6
-4
@@ -28,7 +28,7 @@ MAX_RESOLUTION: int = 600
|
||||
# packet (packet-size bytes)
|
||||
ETVR_HEADER = b"\xff\xa0\xff\xa1"
|
||||
ETVR_HEADER_LEN = 6
|
||||
PORTS = ("COM", "/dev/tty")
|
||||
PORTS = ("COM", "/dev/ttyACM")
|
||||
|
||||
|
||||
class CameraState(Enum):
|
||||
@@ -323,18 +323,20 @@ class Camera:
|
||||
try:
|
||||
rate = 115200 if sys.platform == "darwin" else 3000000 # Higher baud rate not working on macOS
|
||||
conn = serial.Serial(baudrate=rate, port=port, xonxoff=False, dsrdtr=False, rtscts=False)
|
||||
# Set explicit buffer size for serial.
|
||||
conn.set_buffer_size(rx_size=BUFFER_SIZE, tx_size=BUFFER_SIZE)
|
||||
# Set explicit buffer size for serial. This function is Windows only!
|
||||
if is_nt:
|
||||
conn.set_buffer_size(rx_size=BUFFER_SIZE, tx_size=BUFFER_SIZE)
|
||||
|
||||
print(
|
||||
f'{Fore.CYAN}[{lang._instance.get_string("log.info")}] {lang._instance.get_string("info.ETVRConnected")} {port}{Fore.RESET}'
|
||||
)
|
||||
self.serial_connection = conn
|
||||
self.camera_status = CameraState.CONNECTED
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
print(
|
||||
f'{Fore.CYAN}[{lang._instance.get_string("log.info")}] {lang._instance.get_string("info.ETVRFailiure")} {port}{Fore.RESET}'
|
||||
)
|
||||
print(e)
|
||||
self.camera_status = CameraState.DISCONNECTED
|
||||
|
||||
def clamp_max_res(self, image: MatLike) -> MatLike:
|
||||
|
||||
@@ -319,7 +319,7 @@ class CameraWidget:
|
||||
# if value not in self.camera_list:
|
||||
# self.config.capture_source = value
|
||||
# if "COM" not in value:
|
||||
ports = ("COM", "/dev/tty")
|
||||
ports = ("COM", "/dev/ttyACM")
|
||||
if any(x in str(value) for x in ports):
|
||||
self.config.capture_source = value
|
||||
else:
|
||||
@@ -341,7 +341,7 @@ class CameraWidget:
|
||||
and ".mp4" not in value
|
||||
and "udp" not in value
|
||||
and "COM" not in value
|
||||
and "/dev/tty" not in value
|
||||
and "/dev/ttyACM" not in value
|
||||
and value not in self.camera_list
|
||||
): # If http is not in camera address, add it.
|
||||
self.config.capture_source = (
|
||||
|
||||
@@ -23,20 +23,37 @@ By defualt Project Babble is under a non-commerical license! Please contact us a
|
||||
### Windows
|
||||
Head to the releases section and [download the latest installer](https://github.com/Project-Babble/ProjectBabble/releases/latest).
|
||||
|
||||
### Linux
|
||||
Install `git`, `curl` and a version of `python` greater than `3.8` for your distro.
|
||||
### MacOS and Linux
|
||||
Install `git`, `curl` and a version of `python` (between `3.8` and `3.12`) for your distro.
|
||||
|
||||
Then, copy paste and run the following script into the terminal of your choice:
|
||||
|
||||
#### For the latest commit:
|
||||
|
||||
```bash
|
||||
bash -c "$(curl -fsSL https://gist.githubusercontent.com/dfgHiatus/a92a3caae24c1bfab1c7544537a654c5/raw/fc30aa550c3c7aa83c37a72168e75ef92388e39b/project-babble-install.sh)"
|
||||
bash -c "$(curl -fsSL https://gist.githubusercontent.com/dfgHiatus/e1bce63cd6be1e8645c3b3adfd5b71a6/raw/26561da3b2bcf738f580176229e4853c18ddf554/project-babble-installer-latest.sh)"
|
||||
```
|
||||
|
||||
#### For the latest tagged release:
|
||||
|
||||
```bash
|
||||
bash -c "$(curl -fsSL https://gist.githubusercontent.com/dfgHiatus/a92a3caae24c1bfab1c7544537a654c5/raw/63573d5c882b4152c9434b9dd4bc888573fe9e98/project-babble-installer-tagged.sh)"
|
||||
```
|
||||
|
||||
Once it's finished installing, you can update and run the Babble app by typing `babble-app` into your terminal.
|
||||
|
||||
*You should also be able to run the Windows executable through Wine!*
|
||||
|
||||
#### Notes:
|
||||
#### Notes on Linux:
|
||||
|
||||
##### KDE Plasma
|
||||
|
||||
If your GUI window shows just the top row of radio buttons, set a resolution for the Babble App manually in KDE's Window Settings. 800x600y is a good starting point with plenty of empty space.
|
||||
|
||||
---
|
||||
|
||||
##### v4l2/v4l-linux
|
||||
|
||||
If you receive a `["Error listing UVC devices on Linux ... No such file or directory"]` when choosing/changing your camera, you'll need to install video4linux (`v4l-utils`) for your distro.
|
||||
|
||||
For Ubuntu or other distros with apt:
|
||||
@@ -44,6 +61,10 @@ For Ubuntu or other distros with apt:
|
||||
sudo apt-get install v4l-utils
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
##### tkinter
|
||||
|
||||
If you receive a `ModuleNotFoundError: No module named 'tkinter'` error message on run, you'll need to install `tkinter` for your distro.
|
||||
|
||||
For Ubuntu or other distros with apt:
|
||||
@@ -57,6 +78,12 @@ sudo dnf install python3-tkinter
|
||||
|
||||
You can read more about this [here](https://stackoverflow.com/questions/25905540/importerror-no-module-named-tkinter).
|
||||
|
||||
---
|
||||
|
||||
##### udev
|
||||
|
||||
If you have trouble connecting to your Babble Board (IE being denied permission to access it), you will need to set up and configure [udev](https://docs.platformio.org/en/latest/core/installation/udev-rules.html) rules.
|
||||
|
||||
## Usage
|
||||
We have integrations for [VRChat](https://docs.babble.diy/docs/software/integrations/vrc), [Resonite](https://docs.babble.diy/docs/software/integrations/resonite) and [ChilloutVR](https://docs.babble.diy/docs/software/integrations/chilloutVR)!
|
||||
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if running on a supported operating system
|
||||
if [[ "$OSTYPE" != "linux-gnu"* ]] && [[ "$OSTYPE" != "darwin"* ]]; then
|
||||
echo "Error: This script is only compatible with Linux and macOS operating systems."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check Python version
|
||||
if ! command -v python3 &> /dev/null; then
|
||||
echo "Error: Python is not installed. Please install Python 3.8 or higher."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
python_version_major=$(python3 -c 'import platform; print(platform.python_version_tuple()[0])')
|
||||
python_version_minor=$(python3 -c 'import platform; print(platform.python_version_tuple()[1])')
|
||||
if (( python_version_major < 3 || python_version_minor < 8 )); then
|
||||
echo "Error: Your Python version is too low! Please install 3.8 or higher."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
install_dir="$HOME/.local/share/project-babble"
|
||||
bin_dir="$HOME/.local/bin"
|
||||
|
||||
# Create installation directory if it doesn't exist
|
||||
mkdir -p "$install_dir"
|
||||
|
||||
# Function to install requirements
|
||||
install_requirements() {
|
||||
cd "$install_dir"
|
||||
cd BabbleApp
|
||||
echo "Installing requirements..."
|
||||
# Create a temporary requirements file without the Windows-only package
|
||||
grep -v "onnxruntime-directml" requirements.txt > unix_requirements.txt
|
||||
pip install -r unix_requirements.txt --quiet
|
||||
rm unix_requirements.txt
|
||||
}
|
||||
|
||||
# Function to get the latest commit hash
|
||||
get_latest_commit() {
|
||||
git fetch origin main
|
||||
git rev-parse origin/main
|
||||
}
|
||||
|
||||
# Function to get the current commit hash
|
||||
get_current_commit() {
|
||||
git rev-parse HEAD
|
||||
}
|
||||
|
||||
# Function to update the repository
|
||||
update_repo() {
|
||||
echo "Checking for updates..."
|
||||
git fetch origin main
|
||||
local_commit=$(get_current_commit)
|
||||
remote_commit=$(get_latest_commit)
|
||||
|
||||
if [ "$local_commit" != "$remote_commit" ]; then
|
||||
echo "New version available"
|
||||
echo "Current commit: ${local_commit:0:8}"
|
||||
echo "Latest commit: ${remote_commit:0:8}"
|
||||
echo "Updating to the latest version..."
|
||||
git checkout main
|
||||
git pull origin main
|
||||
echo "Updating dependencies..."
|
||||
source venv/bin/activate
|
||||
install_requirements
|
||||
deactivate
|
||||
echo "Project Babble has been updated successfully to commit ${remote_commit:0:8}!"
|
||||
else
|
||||
echo "Project Babble is already at the latest commit: ${local_commit:0:8}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Ensure we're in the correct directory
|
||||
cd "$install_dir"
|
||||
cd BabbleApp
|
||||
|
||||
# Create venv if it does not exist
|
||||
if ! [ -d "venv" ]; then
|
||||
python3 -m venv venv
|
||||
fi
|
||||
|
||||
# Use the correct activation script based on OS
|
||||
source venv/bin/activate
|
||||
update_repo
|
||||
echo "Verifying dependencies. This might take a second!"
|
||||
install_requirements
|
||||
echo "Starting Babble app..."
|
||||
python3 babbleapp.py
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if running on Linux
|
||||
if [[ "$OSTYPE" != "linux-gnu"* ]]; then
|
||||
echo "Error: This script is only compatible with Linux operating systems."
|
||||
# Check if running on a supported operating system
|
||||
if [[ "$OSTYPE" != "linux-gnu"* ]] && [[ "$OSTYPE" != "darwin"* ]]; then
|
||||
echo "Error: This script is only compatible with Linux and macOS operating systems."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -19,12 +19,15 @@ if (( python_version_major < 3 || python_version_minor < 8 )); then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Set installation directory
|
||||
install_dir="$HOME/.local/share/project-babble"
|
||||
bin_dir="$HOME/.local/bin"
|
||||
|
||||
# Create installation directory if it doesn't exist
|
||||
mkdir -p "$install_dir"
|
||||
|
||||
# Function to install requirements
|
||||
install_requirements() {
|
||||
cd $install_dir
|
||||
cd "$install_dir"
|
||||
cd BabbleApp
|
||||
echo "Installing requirements..."
|
||||
# Create a temporary requirements file without the Windows-only package
|
||||
@@ -62,7 +65,7 @@ update_repo() {
|
||||
}
|
||||
|
||||
|
||||
cd $install_dir
|
||||
cd "$install_dir"
|
||||
cd BabbleApp
|
||||
|
||||
# Create venv if it does not exists
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loaded 100 of 231 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user