73 Commits

Author SHA1 Message Date
restitux 4778622137 test
Build Mumble Web 2 / linux_build (push) Successful in 1m38s
Build Mumble Web 2 / windows_build (push) Successful in 7m53s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 12s
2025-12-03 00:02:18 -07:00
restitux 1ff8f8bf6a test
Build Mumble Web 2 / linux_build (push) Successful in 1m39s
Build Mumble Web 2 / windows_build (push) Failing after 7m12s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 12s
2025-12-02 23:54:03 -07:00
restitux 61515d5478 test
Build Mumble Web 2 / linux_build (push) Successful in 1m44s
Build Mumble Web 2 / windows_build (push) Failing after 7m14s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 13s
2025-12-02 23:46:33 -07:00
restitux 011e6b263f test
Build Mumble Web 2 / linux_build (push) Successful in 1m41s
Build Mumble Web 2 / windows_build (push) Failing after 7m12s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 13s
2025-12-02 23:33:05 -07:00
restitux 21a223d3b2 test
Build Mumble Web 2 / linux_build (push) Successful in 1m36s
Build Mumble Web 2 / windows_build (push) Failing after 7m13s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 12s
2025-12-02 23:23:48 -07:00
restitux 8ffb7e54fe test
Build Mumble Web 2 / linux_build (push) Successful in 1m36s
Build Mumble Web 2 / windows_build (push) Failing after 7m28s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 13s
2025-12-02 23:07:41 -07:00
restitux 91a0490a13 test
Build Mumble Web 2 / windows_build (push) Failing after 10s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 12s
Build Mumble Web 2 / linux_build (push) Has been cancelled
2025-12-02 23:06:58 -07:00
restitux 374a49b540 test
Build Mumble Web 2 / windows_build (push) Failing after 12s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 12s
Build Mumble Web 2 / linux_build (push) Has been cancelled
2025-12-02 23:06:28 -07:00
restitux c1c06ac880 test
Build Mumble Web 2 / windows_build (push) Failing after 13s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 12s
Build Mumble Web 2 / linux_build (push) Has been cancelled
2025-12-02 23:06:00 -07:00
restitux de3f9cfed2 test
Build Mumble Web 2 / windows_build (push) Failing after 10s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 13s
Build Mumble Web 2 / linux_build (push) Has been cancelled
2025-12-02 23:04:30 -07:00
restitux e0407130e9 test
Build Mumble Web 2 / windows_build (push) Failing after 10s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 12s
Build Mumble Web 2 / linux_build (push) Has been cancelled
2025-12-02 23:03:57 -07:00
restitux 35eeb6227f test
Build Mumble Web 2 / windows_build (push) Failing after 13s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 13s
Build Mumble Web 2 / linux_build (push) Has been cancelled
2025-12-02 23:03:11 -07:00
restitux f02609a57b test
Build Mumble Web 2 / windows_build (push) Successful in 14s
Build Mumble Web 2 / linux_build (push) Has been cancelled
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Has been cancelled
2025-12-02 23:02:43 -07:00
restitux 6e4afb2885 test
Build Mumble Web 2 / windows_build (push) Failing after 15s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 13s
Build Mumble Web 2 / linux_build (push) Has been cancelled
2025-12-02 23:02:04 -07:00
restitux 3b772ab61d test
Build Mumble Web 2 / windows_build (push) Failing after 10s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 12s
Build Mumble Web 2 / linux_build (push) Has been cancelled
2025-12-02 23:00:51 -07:00
restitux 55a6d7daf6 test
Build Mumble Web 2 / windows_build (push) Failing after 15s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 13s
Build Mumble Web 2 / linux_build (push) Successful in 1m31s
2025-12-02 22:59:09 -07:00
restitux 867d75f0ee test
Build Mumble Web 2 / windows_build (push) Failing after 13s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 13s
Build Mumble Web 2 / linux_build (push) Has been cancelled
2025-12-02 22:57:40 -07:00
restitux fbc68f078b test
Build Mumble Web 2 / windows_build (push) Failing after 14s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 13s
Build Mumble Web 2 / linux_build (push) Successful in 1m29s
2025-12-02 22:56:00 -07:00
restitux 206563fc03 test
Build Mumble Web 2 / windows_build (push) Failing after 13s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 12s
Build Mumble Web 2 / linux_build (push) Has been cancelled
2025-12-02 22:54:42 -07:00
restitux 28b44b8268 test
Build Mumble Web 2 / windows_build (push) Failing after 13s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 13s
Build Mumble Web 2 / linux_build (push) Successful in 1m27s
2025-12-02 22:51:54 -07:00
restitux df960c47b1 test
Build Mumble Web 2 / windows_build (push) Failing after 14s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 13s
Build Mumble Web 2 / linux_build (push) Successful in 1m28s
2025-12-02 22:50:19 -07:00
restitux b14e2d4d7c test
Build Mumble Web 2 / windows_build (push) Failing after 7s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 12s
Build Mumble Web 2 / linux_build (push) Successful in 1m27s
2025-12-02 22:47:08 -07:00
restitux 00d10f540e test
Build Mumble Web 2 / windows_build (push) Failing after 8s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 12s
Build Mumble Web 2 / linux_build (push) Successful in 1m33s
2025-12-02 22:45:08 -07:00
restitux 5b7e6e083b test 2025-12-02 22:45:00 -07:00
restitux 7fb0ee548e fix mount?
Build Mumble Web 2 / windows_build (push) Failing after 8s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 13s
Build Mumble Web 2 / linux_build (push) Successful in 1m28s
2025-12-02 22:43:14 -07:00
restitux d8a42592ae fix docker command
Build Mumble Web 2 / windows_build (push) Failing after 8s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 12s
Build Mumble Web 2 / linux_build (push) Successful in 1m34s
2025-12-02 22:24:04 -07:00
restitux fdcbc73d6b fix multiline command
Build Mumble Web 2 / windows_build (push) Failing after 13s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 12s
Build Mumble Web 2 / linux_build (push) Has been cancelled
2025-12-02 22:23:00 -07:00
restitux ec485ea16d switch to manual docker run
Build Mumble Web 2 / windows_build (push) Failing after 14s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 12s
Build Mumble Web 2 / linux_build (push) Successful in 1m32s
2025-12-02 22:19:30 -07:00
restitux 42a8643e8e turn windows build back on
Build Mumble Web 2 / windows_build (push) Failing after 16s
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 13s
Build Mumble Web 2 / linux_build (push) Successful in 1m35s
2025-12-02 22:04:10 -07:00
restitux 5f122b31a6 cleanup log printing
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 5m21s
2025-12-02 21:47:18 -07:00
restitux 8554fe92ad add ligmite
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 10m33s
2025-12-02 19:03:04 -07:00
restitux 1b1b743158 change to vscmd shell when building dioxus cli
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 6m10s
2025-12-02 18:50:42 -07:00
restitux 1f1c03fd98 fix bash path
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 16s
2025-12-02 18:30:30 -07:00
restitux cbfa6a930e switch to bash when possible
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 16s
2025-12-02 18:08:38 -07:00
restitux 387c2f9551 switch to bash when possible
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 1m25s
2025-12-02 18:04:00 -07:00
restitux 36174cff18 fix dockerfile v500
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 5m34s
2025-12-02 17:50:14 -07:00
restitux 1a5e9bd701 cleanup
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 1m39s
2025-12-02 17:27:22 -07:00
restitux 55d03fcc27 add git and dioxus cli to container
Build Mumble Web 2 / windows_build (push) Failing after 2s
Build Mumble Web 2 / linux_build (push) Has been cancelled
2025-12-02 17:26:22 -07:00
restitux 35c4681f11 add rust to container build
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 3m17s
2025-12-02 17:15:09 -07:00
restitux 3c298f2d07 add cmake to container build
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 26s
2025-12-02 16:58:50 -07:00
restitux 467940f3f9 fix logging v4
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 1m13s
2025-12-02 16:54:39 -07:00
restitux 613482e387 fix logging v3
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 14s
2025-12-02 16:51:47 -07:00
restitux f2eea9c048 fix logging v2
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 27s
2025-12-02 16:48:57 -07:00
restitux c6f089cf77 Change --quiet to --passive
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 25s
2025-12-02 16:46:38 -07:00
restitux b18d583687 Change which VS build tools are installed
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 1m14s
2025-12-02 16:44:48 -07:00
restitux d23486760f fix container name
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 30s
2025-12-02 16:37:52 -07:00
restitux 18ee97cf32 new docker container build test
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Successful in 3m17s
2025-12-01 02:14:36 -07:00
restitux 9da86bd4c6 remove --quiet
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Has been cancelled
2025-12-01 00:35:08 -07:00
restitux 3422eac140 add tmp directory
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Failing after 6m38s
2025-12-01 00:22:07 -07:00
restitux badfc20751 drop buildx
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Failing after 3m27s
2025-12-01 00:14:50 -07:00
restitux 2405516326 add docker buildx setup step
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Failing after 29s
2025-12-01 00:01:23 -07:00
restitux 769be3403d add docker registry url
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Failing after 13s
2025-11-30 23:58:54 -07:00
restitux 4e3a87084d Disable regular build
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Failing after 11s
2025-11-30 23:52:33 -07:00
restitux 91317e13e9 Add windows container build
Build Mumble Web 2 release builder containers / windows-release-builder-container-build (push) Has been cancelled
Build Mumble Web 2 / windows_build (push) Has been cancelled
Build Mumble Web 2 / linux_build (push) Has been cancelled
2025-11-30 23:52:03 -07:00
restitux cbc3ac75dd test
Build Mumble Web 2 / linux_build (push) Successful in 1m34s
Build Mumble Web 2 / windows_build (push) Failing after 3m26s
2025-11-30 22:49:01 -07:00
restitux 52dd7d0e45 test
Build Mumble Web 2 / windows_build (push) Failing after 15s
Build Mumble Web 2 / linux_build (push) Has been cancelled
2025-11-30 22:47:41 -07:00
restitux 03f69b1da3 old cmake build
Build Mumble Web 2 / windows_build (push) Failing after 15s
Build Mumble Web 2 / linux_build (push) Successful in 1m33s
2025-11-30 22:44:46 -07:00
restitux 145ef1e3ae add cmake build
Build Mumble Web 2 / windows_build (push) Failing after 14s
Build Mumble Web 2 / linux_build (push) Has been cancelled
2025-11-30 22:43:15 -07:00
restitux a24366c9b3 add cmake build
Build Mumble Web 2 / windows_build (push) Failing after 16s
Build Mumble Web 2 / linux_build (push) Successful in 1m31s
2025-11-30 22:30:03 -07:00
restitux 5de861484c test
Build Mumble Web 2 / linux_build (push) Successful in 1m42s
Build Mumble Web 2 / windows_build (push) Failing after 3m8s
2025-11-30 22:11:55 -07:00
restitux 008e070d85 quote dx bundle command
Build Mumble Web 2 / linux_build (push) Successful in 1m42s
Build Mumble Web 2 / windows_build (push) Failing after 3m8s
2025-11-30 22:06:24 -07:00
restitux afe056353e quote dx bundle command
Build Mumble Web 2 / linux_build (push) Successful in 1m55s
Build Mumble Web 2 / windows_build (push) Failing after 3m10s
2025-11-30 21:58:51 -07:00
restitux 6162b1a435 dx bundle redirect stderr to stdout
Build Mumble Web 2 / linux_build (push) Successful in 1m45s
Build Mumble Web 2 / windows_build (push) Failing after 3m6s
2025-11-30 15:40:53 -07:00
restitux 49ac9938ad add --verbose back
Build Mumble Web 2 / linux_build (push) Successful in 1m44s
Build Mumble Web 2 / windows_build (push) Failing after 3m11s
2025-11-30 15:37:09 -07:00
restitux a76ca3a9a5 remove --verbose from dx bundle and comment out cargo check
Build Mumble Web 2 / linux_build (push) Successful in 1m42s
Build Mumble Web 2 / windows_build (push) Failing after 3m7s
2025-11-30 15:16:24 -07:00
restitux c821b54505 set dx bundle to --trace
Build Mumble Web 2 / linux_build (push) Successful in 1m43s
Build Mumble Web 2 / windows_build (push) Failing after 5m0s
2025-11-30 15:10:29 -07:00
restitux da6354519a set CARGO_LOG=trace on dx bundle step
Build Mumble Web 2 / linux_build (push) Successful in 1m45s
Build Mumble Web 2 / windows_build (push) Failing after 4m58s
2025-11-30 15:01:54 -07:00
restitux 9434563b66 set dx bundle to --verbose
Build Mumble Web 2 / linux_build (push) Successful in 1m57s
Build Mumble Web 2 / windows_build (push) Failing after 4m57s
2025-11-30 14:53:39 -07:00
sam 79e43a727b add msvc dev cmd
Build Mumble Web 2 / linux_build (push) Successful in 1m37s
Build Mumble Web 2 / windows_build (push) Failing after 5m47s
2025-11-28 01:23:17 -07:00
sam 38690e7b3a pwsh -> powershell
Build Mumble Web 2 / linux_build (push) Successful in 2m12s
Build Mumble Web 2 / windows_build (push) Failing after 2m46s
2025-11-28 00:02:35 -07:00
sam 3e5d884597 first attempt at windows job
Build Mumble Web 2 / windows_build (push) Failing after 32s
Build Mumble Web 2 / linux_build (push) Successful in 4m58s
2025-11-27 23:46:22 -07:00
sam 72cd558e2a prepare for bundling 2025-11-27 23:42:08 -07:00
sam 0e2704fad2 update to 0.7.1 in readme & cleanup unused files 2025-11-27 22:44:42 -07:00
22 changed files with 147 additions and 281 deletions
+11 -20
View File
@@ -48,34 +48,25 @@ jobs:
- name: Checkout
uses: actions/checkout@v5
- name: Restore Rust cache
uses: actions/cache/restore@v4
with:
path: |
~/.cargo
./target
key: rust-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
rust-${{ runner.os }}-
#- uses: Swatinem/rust-cache@v2
#- uses: ilammy/msvc-dev-cmd@v1
#- name: Check dioxus project
# run: cargo check -p mumble-web2-gui --features desktop
- name: Pull builder container
run: docker pull git.ohea.xyz/mumble/mumble-web2/windows-release-builder:latest
- name: Bundle dioxus project
run: docker run `
run:
docker run `
--mount "type=bind,source=${PWD},target=C:\app" `
--workdir "C:\app\gui" `
--workdir "C:\app" `
git.ohea.xyz/mumble/mumble-web2/windows-release-builder:latest `
C:\Users\ContainerAdministrator\.cargo\bin\dx.exe bundle --verbose --trace -p mumble-web2-gui --release --windows
- name: Save Rust cache
if: always()
uses: actions/cache/save@v4
with:
path: |
~/.cargo
./target
key: rust-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
#dir C:\Users\ContainerAdministrator\.cargo\bin\
#'cd /app && `
- name: Upload mumble-web2-gui Windows Artifact
uses: https://gitea.com/actions/gitea-upload-artifact@v4
@@ -1,8 +1,5 @@
name: Build Mumble Web 2 release builder containers
on:
workflow_dispatch:
schedule:
- cron: "0 4 * * *"
on: [push]
jobs:
windows-release-builder-container-build:
@@ -20,8 +17,6 @@ jobs:
password: ${{ secrets.CI_REGISTRY_PASSWORD }}
- name: Build Windows image
shell: bash
run: |
docker pull "$(grep -m1 '^FROM' ./docker/windows-release-builder.Dockerfile | awk '{print $2}')"
docker build -t git.ohea.xyz/mumble/mumble-web2/windows-release-builder:latest -f ./docker/windows-release-builder.Dockerfile .
docker push git.ohea.xyz/mumble/mumble-web2/windows-release-builder:latest
+1
View File
@@ -3,6 +3,7 @@ use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Deserialize, Serialize, Default)]
pub struct ClientConfig {
pub proxy_url: Option<String>,
pub status_url: Option<String>,
pub cert_hash: Option<Vec<u8>>,
pub any_server: bool,
}
+1 -1
View File
@@ -1,4 +1,4 @@
proxy_url = "https://127.0.0.1:4433/proxy"
public_url = "https://127.0.0.1:4433"
https_listen_address = "127.0.0.1:4433"
http_listen_address = "127.0.0.1:8080"
mumble_server_url = "[SERVER_URL_HERE]"
+1
View File
@@ -1,3 +1,4 @@
public_url = "https://localhost:64444"
proxy_url = "https://127.0.0.1:4433/proxy"
https_listen_address = "127.0.0.1:4433"
http_listen_address = "127.0.0.1:4400"
+4 -2
View File
@@ -38,16 +38,18 @@ RUN Set-ExecutionPolicy Bypass -Scope Process; `
[System.Net.SecurityProtocolType]::Tls12; `
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# Install Git and Rustup via Chocolatey
RUN choco install git -y --no-progress
RUN choco install rustup.install -y --no-progress
# Install stable Rust toolchain
RUN rustup toolchain install stable-x86_64-pc-windows-msvc
RUN rustup default stable-x86_64-pc-windows-msvc
SHELL ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
# Install dioxus-cli from git HEAD with cargo
# This is to work around a bug in the windows builder upstream.
# Dioxus has released 0.7.2, but it seems to be broken for now.
RUN cargo install --git https://github.com/DioxusLabs/dioxus dioxus-cli
# Define the entry point for the docker container.
# This entry point starts the developer command prompt and launches the PowerShell shell.
ENTRYPOINT ["C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\Common7\\Tools\\VsDevCmd.bat", "&&", "powershell.exe", "-NoLogo", "-ExecutionPolicy", "Bypass"]
+4 -6
View File
@@ -30,6 +30,8 @@ web-sys = { version = "^0.3.72", features = [
"EncodedAudioChunkInit",
"EncodedAudioChunkType",
"CodecState",
"MediaStreamTrackGenerator",
"MediaStreamTrackGeneratorInit",
"AudioContext",
"AudioContextOptions",
"MediaStream",
@@ -40,7 +42,6 @@ web-sys = { version = "^0.3.72", features = [
"AudioWorkletNode",
"AudioWorklet",
"AudioWorkletProcessor",
"MessagePort",
"MediaStreamConstraints",
"WorkletOptions",
"AudioEncoder",
@@ -87,7 +88,7 @@ tracing = "^0.1.40"
color-eyre = "^0.6.3"
crossbeam-queue = "^0.3.11"
lol_html = "^2.2.0"
rfd = { git = "https://github.com/samsartor/rfd.git", version = "^0.16.0", default-features = false }
rfd = { git = "https://github.com/samsartor/rfd.git", version = "^0.16.0", default-features = false }
base64 = "^0.22"
mime_guess = "^2.0.5"
async_cell = "^0.2.3"
@@ -96,9 +97,7 @@ dioxus-asset-resolver = "0.7.1"
# Denoising
# =========
deep_filter = { git = "https://github.com/Rikorose/DeepFilterNet.git", rev = "d375b2d8309e0935d165700c91da9de862a99c31", features = [
"tract",
] }
deep_filter = { git = "https://github.com/Rikorose/DeepFilterNet.git", rev = "d375b2d8309e0935d165700c91da9de862a99c31", features = ["tract"] }
crossbeam = "0.8.4"
[patch.crates-io]
@@ -132,4 +131,3 @@ desktop = [
"rfd/xdg-portal",
"rfd/tokio",
]
+1 -1
View File
@@ -38,7 +38,7 @@ publisher = "OheaCorp"
icon = [
"icons/32x32.png",
"icons/256x256.png",
"assets/favicon.ico",
"gui/assets/favicon.ico",
"icons/icon.icns",
"icons/icon.ico",
]
-5
View File
@@ -279,11 +279,6 @@ a:visited {
color: #b3c6b4;
}
&_version {
color: var(--txt-color);
font-weight: normal;
}
&_bttn {
font-weight: bold;
font-size: large;
@@ -1,7 +1,7 @@
const SAMPLE_RATE = 48000;
const PACKET_SAMPLES = 960;
class RustMicWorklet extends AudioWorkletProcessor {
class RustWorklet extends AudioWorkletProcessor {
constructor(options) {
super();
this.module = options.processorOptions;
@@ -31,7 +31,7 @@ class RustMicWorklet extends AudioWorkletProcessor {
}
this.buffer_offset -= PACKET_SAMPLES;
this.timestamp = null;
}
}
process(inputs) {
//console.log(inputs);
@@ -60,44 +60,4 @@ class RustMicWorklet extends AudioWorkletProcessor {
}
};
class RustSpeakerWorklet extends AudioWorkletProcessor {
constructor() {
super();
this.queue = [];
this.readIndex = 0;
this.port.onmessage = (event) => {
this.queue.push(event.data)
};
}
process(inputs, outputs) {
if (this.queue.length) {
console.log(this.queue[0].samples.length, outputs[0][0].length);
}
const output = outputs[0];
for (let i = 0; i < output[0].length; i++) {
if (!this.queue.length) {
return true;
}
const current = this.queue[0];
for (let ch = 0; ch < output.length; ch++) {
output[ch][i] = current.samples[this.readIndex];
}
this.readIndex++;
if (this.readIndex >= current.samples.length) {
this.queue.shift();
this.readIndex = 0;
}
}
return true;
}
};
registerProcessor("rust_mic_worklet", RustMicWorklet);
registerProcessor("rust_speaker_worklet", RustSpeakerWorklet);
registerProcessor("rust_mic_worklet", RustWorklet);
+8 -56
View File
@@ -1,39 +1,7 @@
use std::env;
use std::path::Path;
use std::process::Command;
fn version_env() -> Option<()> {
if env::var("MUMBLE_WEB2_VERSION").is_ok() {
return Some(());
}
let output = Command::new("git")
.args(["rev-parse", "--short", "HEAD"])
.output()
.ok()?;
let git_hash = String::from_utf8(output.stdout).ok()?;
let git_hash = git_hash.trim(); // drop trailing newline
let status = Command::new("git")
.args(["status", "--porcelain"])
.output()
.ok()?;
let dirty = match status.stdout.is_empty() {
true => "",
false => "-dirty",
};
// Expose it as a compile-time env var
println!("cargo::rustc-env=MUMBLE_WEB2_VERSION=git-{git_hash}{dirty}");
// Optional: rebuild when HEAD changes
println!("cargo::rerun-if-changed=.git/HEAD");
Some(())
}
fn download_deepfilternet() {
fn main() {
// Define the target directory and file
let assets_dir = "assets";
let target_file = format!("{}/DeepFilterNet3_ll_onnx.tar.gz", assets_dir);
@@ -41,46 +9,30 @@ fn download_deepfilternet() {
// Check if the file already exists
if target_path.exists() {
println!(
"cargo::warning=DeepFilterNet model already exists at {}",
target_file
);
println!("cargo:warning=DeepFilterNet model already exists at {}", target_file);
return;
}
println!(
"cargo::warning=Downloading DeepFilterNet model to {}...",
target_file
);
println!("cargo:warning=Downloading DeepFilterNet model to {}...", target_file);
// Download the file using curl
let url = "https://github.com/Rikorose/DeepFilterNet/raw/refs/heads/main/models/DeepFilterNet3_ll_onnx.tar.gz";
let status = Command::new("curl")
.args([
"-L", // Follow redirects
"-o",
&target_file, // Output file
"-L", // Follow redirects
"-o", &target_file, // Output file
url,
])
.status()
.expect("Failed to execute curl command. Make sure curl is installed.");
if !status.success() {
println!("cargo::error=Failed to download DeepFilterNet model from {url}");
return;
panic!("Failed to download DeepFilterNet model from {}", url);
}
println!(
"cargo::warning=Successfully downloaded DeepFilterNet model to {}",
target_file
);
println!("cargo:warning=Successfully downloaded DeepFilterNet model to {}", target_file);
// Rerun this build script if the target file is deleted
println!("cargo::rerun-if-changed={}", target_file);
}
fn main() {
version_env();
download_deepfilternet();
println!("cargo:rerun-if-changed={}", target_file);
}
+19 -6
View File
@@ -545,15 +545,33 @@ pub fn ServerView(config: Resource<ClientConfig>) -> Element {
)
}
async fn get_status(
client: &reqwest::Client,
status_url: &str,
) -> color_eyre::Result<ServerStatus> {
Ok(client
.get(status_url)
.send()
.await?
.json::<ServerStatus>()
.await?)
}
#[component]
pub fn LoginView(config: Resource<ClientConfig>) -> Element {
let net: Coroutine<Command> = use_coroutine_handle();
let last_status = use_signal(|| None::<color_eyre::Result<ServerStatus>>);
use_resource(move || async move {
let Some(config) = config.read().clone() else {
return;
};
let Some(status_url) = config.status_url else {
return;
};
let client = reqwest::Client::new();
loop {
*last_status.write_unchecked() = Some(imp::get_status(&client).await);
*last_status.write_unchecked() = Some(get_status(&client, &status_url).await);
imp::sleep(std::time::Duration::from_secs_f32(1.0)).await;
}
});
@@ -612,16 +630,11 @@ pub fn LoginView(config: Resource<ClientConfig>) -> Element {
),
Connected => unreachable!(),
};
let version = option_env!("MUMBLE_WEB2_VERSION");
rsx!(
div {
class: "login",
h1 {
"Mumble Web"
match version {
Some(v) => rsx!(" " span { class: "login_version", "({v})" }),
None => rsx!(),
}
}
if config.read().as_ref().is_some_and(|cfg| cfg.any_server) {
div {
+3 -3
View File
@@ -97,13 +97,13 @@ impl AudioProcessor {
}
impl AudioProcessor {
pub fn process(&mut self, audio: &[f32], channels: usize, output: &mut Vec<f32>) {
pub fn process(&mut self, audio: &[f32], output: &mut Vec<f32>) {
let mut include_raw = true;
if self.denoise {
with_denoising_model(&self.spawn, |df| {
include_raw = false;
self.buffer.extend(audio.iter().step_by(channels).copied());
self.buffer.extend_from_slice(audio);
output.reserve(audio.len());
let hop = df.hop_size;
@@ -130,7 +130,7 @@ impl AudioProcessor {
}
if include_raw {
output.extend(audio.iter().step_by(channels).copied());
output.extend_from_slice(audio);
}
}
}
+25 -62
View File
@@ -1,11 +1,11 @@
use crate::app::Command;
use crate::effects::{AudioProcessor, AudioProcessorSender};
use color_eyre::eyre::{bail, eyre, Context, Error};
use cpal::traits::{DeviceTrait, HostTrait, StreamTrait as _};
use color_eyre::eyre::{eyre, Context, Error};
use cpal::traits::{DeviceTrait, HostTrait};
use dioxus::hooks::UnboundedReceiver;
use futures::io::{AsyncRead, AsyncWrite};
use mumble_protocol::control::ClientControlCodec;
use mumble_web2_common::{ClientConfig, ServerStatus};
use mumble_web2_common::ClientConfig;
use std::mem::replace;
use std::net::ToSocketAddrs;
use std::sync::Arc;
@@ -43,7 +43,7 @@ const PACKET_SAMPLES: u32 = 960;
type Buffer = Arc<Mutex<dasp_ring_buffer::Bounded<Vec<i16>>>>;
impl AudioSystem {
pub async fn new() -> Result<Self, Error> {
pub fn new() -> Result<Self, Error> {
// TODO
let host = cpal::default_host();
let name = host.id();
@@ -64,46 +64,10 @@ impl AudioSystem {
self.processors.store(Some(processor))
}
fn choose_config(
&self,
configs: impl Iterator<Item = cpal::SupportedStreamConfigRange>,
) -> Result<cpal::StreamConfig, Error> {
let mut supported_configs: Vec<_> = configs
.filter_map(|cfg| cfg.try_with_sample_rate(cpal::SampleRate(SAMPLE_RATE)))
.filter(|cfg| cfg.sample_format() == cpal::SampleFormat::I16)
.map(|cfg| cpal::StreamConfig {
buffer_size: cpal::BufferSize::Fixed(match *cfg.buffer_size() {
cpal::SupportedBufferSize::Range { min, max } => 480.clamp(min, max),
cpal::SupportedBufferSize::Unknown => 480,
}),
..cfg.config()
})
.collect();
supported_configs.sort_by(|a, b| {
let cpal::BufferSize::Fixed(a_buf) = a.buffer_size else {
unreachable!()
};
let cpal::BufferSize::Fixed(b_buf) = b.buffer_size else {
unreachable!()
};
Ord::cmp(&a.channels, &b.channels).then(Ord::cmp(&a_buf, &b_buf))
});
supported_configs
.get(0)
.cloned()
.ok_or(eyre!("no supported stream configs"))
}
pub fn start_recording(
&mut self,
mut each: impl FnMut(Vec<u8>) + Send + 'static,
) -> Result<(), Error> {
let config = self.choose_config(self.input.supported_input_configs()?)?;
info!(
"creating recording on {:?} with {:#?}",
self.input.name()?,
config
);
let mut encoder =
opus::Encoder::new(SAMPLE_RATE, opus::Channels::Mono, opus::Application::Voip)?;
let mut current_processor = AudioProcessor::new_plain();
@@ -114,7 +78,7 @@ impl AudioSystem {
if let Some(new_processor) = processors.take() {
current_processor = new_processor;
}
current_processor.process(frame, config.channels as usize, &mut output_buffer);
current_processor.process(frame, &mut output_buffer);
if output_buffer.len() < PACKET_SAMPLES as usize {
return;
}
@@ -130,12 +94,17 @@ impl AudioSystem {
}
};
match self
.input
.build_input_stream(&config, data_callback, error_callback, None)
{
match self.input.build_input_stream(
&cpal::StreamConfig {
channels: 1,
sample_rate: cpal::SampleRate(SAMPLE_RATE),
buffer_size: cpal::BufferSize::Fixed(PACKET_SAMPLES),
},
data_callback,
error_callback,
None,
) {
Ok(stream) => {
stream.play()?;
self.recording_stream = Some(stream);
Ok(())
}
@@ -147,12 +116,6 @@ impl AudioSystem {
}
pub fn create_player(&mut self) -> Result<AudioPlayer, Error> {
let config = self.choose_config(self.input.supported_input_configs()?)?;
info!(
"creating player on {:?} with {:#?}",
self.output.name().ok(),
&config
);
let buffer = Arc::new(Mutex::new(dasp_ring_buffer::Bounded::from_raw_parts(
0,
0,
@@ -165,16 +128,20 @@ impl AudioSystem {
let stream = {
let buffer = buffer.clone();
self.output.build_output_stream(
&config,
move |frame, _info| {
&cpal::StreamConfig {
channels: 1,
sample_rate: cpal::SampleRate(SAMPLE_RATE),
buffer_size: cpal::BufferSize::Fixed(480), // 10ms playback delay
},
move |frame, info| {
let mut buffer = buffer.lock().unwrap();
for x in frame.chunks_mut(config.channels as usize) {
for x in frame.iter_mut() {
match buffer.pop() {
Some(y) => {
x.fill(y);
*x = y;
}
None => {
x.fill(0);
*x = 0;
}
}
}
@@ -183,7 +150,6 @@ impl AudioSystem {
None,
)?
};
stream.play()?;
Ok(AudioPlayer {
decoder,
stream,
@@ -325,15 +291,12 @@ pub fn load_username() -> Option<String> {
pub async fn load_config() -> color_eyre::Result<ClientConfig> {
Ok(ClientConfig {
proxy_url: None,
status_url: None,
cert_hash: None,
any_server: true,
})
}
pub async fn get_status(client: &reqwest::Client) -> color_eyre::Result<ServerStatus> {
bail!("status not supported on desktop yet")
}
pub fn init_logging() {
use tracing::level_filters::LevelFilter;
use tracing_subscriber::filter::EnvFilter;
+56 -68
View File
@@ -6,7 +6,7 @@ use futures::{AsyncRead, AsyncWrite};
use gloo_timers::future::TimeoutFuture;
use js_sys::Float32Array;
use mumble_protocol::control::ClientControlCodec;
use mumble_web2_common::{ClientConfig, ServerStatus};
use mumble_web2_common::ClientConfig;
use reqwest::Url;
use std::future::Future;
use std::time::Duration;
@@ -15,6 +15,7 @@ use tracing::{debug, error, info, instrument};
use wasm_bindgen::prelude::*;
use wasm_bindgen_futures::JsFuture;
use web_sys::js_sys::{Promise, Reflect, Uint8Array};
use web_sys::AudioContext;
use web_sys::AudioContextOptions;
use web_sys::AudioData;
use web_sys::AudioDecoder;
@@ -29,13 +30,14 @@ use web_sys::EncodedAudioChunkInit;
use web_sys::EncodedAudioChunkType;
use web_sys::MediaStream;
use web_sys::MediaStreamConstraints;
use web_sys::MediaStreamTrackGenerator;
use web_sys::MediaStreamTrackGeneratorInit;
use web_sys::MessageEvent;
use web_sys::WebTransport;
use web_sys::WebTransportBidirectionalStream;
use web_sys::WebTransportOptions;
use web_sys::WorkletOptions;
use web_sys::{console, window};
use web_sys::{AudioContext, AudioDataCopyToOptions};
pub use wasm_bindgen_futures::spawn_local as spawn;
@@ -76,41 +78,12 @@ pub struct AudioSystem {
processors: AudioProcessorSender,
}
async fn attach_worklet(audio_context: &AudioContext) -> Result<(), Error> {
// Create worklets to process mic and speaker audio
// Speaker audio processing worklet only required on
// browsers that don't support MediaStreamTrackGenerator
let options = WorkletOptions::new();
Reflect::set(
&options,
&"processorOptions".into(),
&wasm_bindgen::module(),
)
.ey()?;
let module = asset!("assets/rust_audio_worklet.js").to_string();
info!("loading mic worklet from {module:?}");
audio_context
.audio_worklet()
.ey()?
.add_module_with_options(&module, &options)
.ey()?
.into_future()
.await
.ey()?;
Ok(())
}
impl AudioSystem {
pub async fn new() -> Result<Self, Error> {
pub fn new() -> Result<Self, Error> {
// Create MediaStreams to playback decoded audio
// The audio context is used to reproduce audio.
let webctx = configure_audio_context();
attach_worklet(&webctx).await?;
let processors = AudioProcessorSender::default();
Ok(AudioSystem { webctx, processors })
}
@@ -131,10 +104,18 @@ impl AudioSystem {
}
pub fn create_player(&mut self) -> Result<AudioPlayer, Error> {
let sink_node = AudioWorkletNode::new(&self.webctx, "rust_speaker_worklet").ey()?;
let audio_stream_generator =
MediaStreamTrackGenerator::new(&MediaStreamTrackGeneratorInit::new("audio")).ey()?;
// Connect worklet to destination
sink_node
// Create MediaStream from MediaStreamTrackGenerator
let js_tracks = web_sys::js_sys::Array::new();
js_tracks.push(&audio_stream_generator);
let media_stream = MediaStream::new_with_tracks(&js_tracks).ey()?;
// Create MediaStreamAudioSourceNode
let audio_source = self.webctx.create_media_stream_source(&media_stream).ey()?;
// Connect output of audio_source to audio_context (browser audio)
audio_source
.connect_with_audio_node(&self.webctx.destination())
.ey()?;
@@ -143,31 +124,28 @@ impl AudioSystem {
error!("error decoding audio {:?}", e);
}) as Box<dyn FnMut(JsValue)>);
let sink_port = sink_node.port().ey()?;
// This knows what MediaStreamTrackGenerator to use as it closes around it
let output = Closure::wrap(Box::new(move |audio_data: AudioData| {
// Extract planar PCM from AudioData into an ArrayBuffer or Float32Array
// Here we assume f32 samples, 1 channel for brevity.
let number_of_frames = audio_data.number_of_frames();
let js_buffer = Float32Array::new_with_length(number_of_frames);
let audio_data_copy_to_options = &AudioDataCopyToOptions::new(0);
audio_data_copy_to_options.set_format(web_sys::AudioSampleFormat::F32);
if let Err(e) = audio_data
.copy_to_with_buffer_source(&js_buffer.buffer(), &audio_data_copy_to_options)
{
error!("could not copy audio data to array {:?}", e);
let writable = audio_stream_generator.writable();
if writable.locked() {
return;
}
if let Err(e) = writable.get_writer().map(|writer| {
spawn(async move {
if let Err(e) = JsFuture::from(writer.ready()).await.ey() {
error!("write chunk ready error {:?}", e);
}
if let Err(e) = JsFuture::from(writer.write_with_chunk(&audio_data))
.await
.ey()
{
error!("write chunk error {:?}", e);
};
writer.release_lock();
});
}) {
error!("error writing audio data {:?}", e);
}
// Post to the worklet; include sampleRate and channel count if needed.
let msg = js_sys::Object::new();
js_sys::Reflect::set(&msg, &"samples".into(), &js_buffer).unwrap();
sink_port.post_message(&msg).unwrap();
audio_data.close();
}) as Box<dyn FnMut(AudioData)>);
let audio_decoder = AudioDecoder::new(&AudioDecoderInit::new(
@@ -231,7 +209,7 @@ fn process_audio(frame: &JsValue, processor: &mut AudioProcessor) {
};
let input = samples.to_vec();
let mut output = Vec::with_capacity(input.len());
processor.process(&input, 1, &mut output);
processor.process(&input, &mut output);
samples.copy_from(&output);
}
@@ -256,6 +234,25 @@ async fn run_encoder_worklet(
.map_err(|e| JsError::new(&format!("not a stream: {e:?}")))
.ey()?;
let options = WorkletOptions::new();
Reflect::set(
&options,
&"processorOptions".into(),
&wasm_bindgen::module(),
)
.ey()?;
let module = asset!("assets/rust_mic_worklet.js").to_string();
info!("loading mic worklet from {module:?}");
audio_context
.audio_worklet()
.ey()?
.add_module_with_options(&module, &options)
.ey()?
.into_future()
.await
.ey()?;
let source = audio_context.create_media_stream_source(&stream).ey()?;
let worklet_node = AudioWorkletNode::new(audio_context, "rust_mic_worklet").ey()?;
@@ -429,15 +426,6 @@ pub async fn load_config() -> color_eyre::Result<ClientConfig> {
Ok(config)
}
pub async fn get_status(client: &reqwest::Client) -> color_eyre::Result<ServerStatus> {
Ok(client
.get(absolute_url("status")?)
.send()
.await?
.json::<ServerStatus>()
.await?)
}
pub fn init_logging() {
// copied from tracing_web example usage
+1 -1
View File
@@ -113,7 +113,7 @@ pub async fn network_loop<R: imp::ImpRead, W: imp::ImpWrite>(
});
}
let mut audio = imp::AudioSystem::new().await?;
let mut audio = imp::AudioSystem::new()?;
{
let send_chan = send_chan.clone();
let mut sequence_num = 0;
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

File diff suppressed because one or more lines are too long
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

+7 -1
View File
@@ -1,6 +1,10 @@
use color_eyre::eyre::{anyhow, bail, Context, Result};
use color_eyre::owo_colors::OwoColorize;
use mumble_web2_common::{ClientConfig, ServerStatus};
use once_cell::sync::OnceCell;
use rand::Rng;
use rcgen::date_time_ymd;
use rustls::server;
use salvo::conn::rustls::{Keycert, RustlsConfig};
use salvo::cors::{AllowOrigin, Cors};
use salvo::logging::Logger;
@@ -34,6 +38,7 @@ fn default_cert_alt_names() -> Vec<String> {
#[derive(Debug, Deserialize, Serialize)]
struct Config {
public_url: Url,
proxy_url: Option<Url>,
https_listen_address: SocketAddr,
http_listen_address: Option<SocketAddr>,
@@ -80,8 +85,9 @@ async fn main() -> Result<()> {
let mut client_config = ClientConfig {
proxy_url: match &server_config.proxy_url {
Some(url) => Some(url.to_string()),
None => None,
None => Some(server_config.public_url.join("proxy")?.to_string()),
},
status_url: Some(server_config.public_url.join("status")?.to_string()),
cert_hash: None,
any_server: false,
};