TTP -> MTP, A lot of other stuff #21

Merged
alois merged 81 commits from dev into main 2026-07-21 11:57:33 +03:00
11 changed files with 42 additions and 25 deletions
Showing only changes of commit 76b64886da - Show all commits

(fix): calls
Some checks failed
/ build-desktop (linux) (push) Failing after 5m3s
/ build-web (push) Failing after 5m8s
/ build-mobile (push) Failing after 7m1s
/ release (push) Has been skipped

(fix): deepfilternet3
(feat): remove noise gate logs
(qol): update todo
Alois 2026-07-06 21:45:57 +02:00

View file

@ -275,8 +275,7 @@ function AppShell() {
}
function CallInit() {
useInitializeCall();
return null;
return useInitializeCall();
}
const rootRoute = createRootRoute({

View file

@ -744,14 +744,14 @@ Generated from pnpm-lock.yaml and installed packages in workspace node_modules f
- Folder: `licenses/decimal.js-light@2.5.1`
- Source package dir: `apps/web/node_modules/decimal.js-light`
## deepfilternet3-noise-filter@1.3.0
## deepfilternet3-noise-filter@1.2.1
- License: (Apache-2.0 OR MIT)
- Homepage: https://github.com/mezonai/mezon-noise-suppression#readme
- Repository: git+https://github.com/mezonai/mezon-noise-suppression.git
- Description: Custom audio processor with DeepFilterNet3 noise filtering integrated with LiveKit client
- Included files: LICENSE-APACHE, LICENSE-MIT
- Folder: `licenses/deepfilternet3-noise-filter@1.3.0`
- Folder: `licenses/deepfilternet3-noise-filter@1.2.1`
- Source package dir: `packages/call/node_modules/deepfilternet3-noise-filter`
## detect-node-es@1.1.0

View file

@ -2651,10 +2651,10 @@
},
{
"type": "library",
"bomRef": "pkg:npm/deepfilternet3-noise-filter@1.3.0",
"bomRef": "pkg:npm/deepfilternet3-noise-filter@1.2.1",
"name": "deepfilternet3-noise-filter",
"version": "1.3.0",
"purl": "pkg:npm/deepfilternet3-noise-filter@1.3.0",
"version": "1.2.1",
"purl": "pkg:npm/deepfilternet3-noise-filter@1.2.1",
"description": "Custom audio processor with DeepFilterNet3 noise filtering integrated with LiveKit client",
"licenses": [
{
@ -2676,7 +2676,7 @@
"properties": [
{
"name": "local:licenseFolder",
"value": "licenses/deepfilternet3-noise-filter@1.3.0"
"value": "licenses/deepfilternet3-noise-filter@1.2.1"
},
{
"name": "local:sourcePackageDir",

View file

@ -368,7 +368,7 @@
},
{
"name": "@radix-ui/react-slot",
"version": "1.3.0",
"version": "1.2.1",
"license": "MIT",
"homepage": "https://radix-ui.com/primitives",
"repository": "git+https://github.com/radix-ui/primitives.git",
@ -1027,7 +1027,7 @@
"LICENSE-APACHE",
"LICENSE-MIT"
],
"licenseFolder": "licenses/deepfilternet3-noise-filter@1.3.0",
"licenseFolder": "licenses/deepfilternet3-noise-filter@1.2.1",
"sourcePackageDir": "packages/call/node_modules/deepfilternet3-noise-filter"
},
{

View file

@ -25,7 +25,7 @@
"@tensamin/mtp": "workspace:*",
"@tensamin/ui": "*",
"@tensamin/user": "workspace:*",
"deepfilternet3-noise-filter": "^1.2.1",
"deepfilternet3-noise-filter": "1.2.1",
"livekit-client": "^2.18.8",
"lucide-react": "^1.14.0",
"react": "^19.2.0",

View file

@ -1,4 +1,3 @@
import { log } from "@tensamin/shared/log";
import {
clearSpeakingParticipants,
removeSpeakingParticipant,
@ -138,10 +137,8 @@ class SpeakingDetector {
const db = 20 * Math.log10(Math.max(rms, 0.0001));
if (!this.localMicGateClosed && db < this.gateThresholdStart) {
log(3, "noise gate", "purple", "closed");
this.muteLocalTrack(true);
} else if (this.localMicGateClosed && db > this.gateThresholdEnd) {
log(3, "noise gate", "purple", "opened");
this.muteLocalTrack(false);
}
}

View file

@ -646,7 +646,7 @@ export async function openCallPage(callId: string) {
// Request the LiveKit token that authorizes this client to join a call.
export async function getCallToken(callId: string): Promise<string> {
const response = await requireRuntime(useCall.getState().runtime)
.send("call_token", {
.send("CallToken", {
CallId: callId,
})
.catch((err) => {
@ -679,7 +679,7 @@ export async function sendCallInvite(userId: number) {
version: CALL_SECRET_VERSION,
});
await runtime.send("call_invite", {
await runtime.send("CallInvite", {
ReceiverId: userId,
CallId: callId,
CallSecret: {
@ -1222,7 +1222,7 @@ export function useInitializeCall() {
// listen to call invites
useEffect(() => {
subscribePush(async (message) => {
return subscribePush(async (message) => {
if (message.type !== "CallInvite") return;
const { CallId, CallSecret, SenderId } = message.data as {
@ -1231,7 +1231,15 @@ export function useInitializeCall() {
SenderId: number;
};
showCallingScreen(CallId, CallSecret, SenderId);
if (SenderId === Number(await load("user_id"))) {
return;
}
showCallingScreen(
CallId,
normalizeWrappedCallSecret(CallSecret),
SenderId,
);
});
}, [load, subscribePush, showCallingScreen]);
@ -1564,6 +1572,18 @@ export function useInitializeCall() {
send("CallData", { CallId: callId })
.then((data) => {
if (data.type === "ErrorNotFound") {
setCurrentCallData({
UserIds: [],
exists: false,
});
return;
}
if (data.type.startsWith("Error")) {
throw new Error(`CallData failed: ${data.type}`);
}
setCurrentCallData({
...(data.data as z.infer<typeof mtp.CallData.response>),
exists: true,

10
pnpm-lock.yaml generated
View file

@ -529,8 +529,8 @@ importers:
specifier: workspace:*
version: link:../user
deepfilternet3-noise-filter:
specifier: ^1.2.1
version: 1.3.0(livekit-client@2.20.0(@types/dom-mediacapture-record@1.0.22))
specifier: 1.2.1
version: 1.2.1(livekit-client@2.20.0(@types/dom-mediacapture-record@1.0.22))
livekit-client:
specifier: ^2.18.8
version: 2.20.0(@types/dom-mediacapture-record@1.0.22)
@ -2690,8 +2690,8 @@ packages:
deep-is@0.1.4:
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
deepfilternet3-noise-filter@1.3.0:
resolution: {integrity: sha512-yYFUlPuvPguqcd/R6/OSsr0noGqlqOE50JkCWYHogk+PjLj9qrNgwTt5zKraVkKnw0l4+eXJagkz2SUWtUl4sQ==}
deepfilternet3-noise-filter@1.2.1:
resolution: {integrity: sha512-OAyrHTDlUHH+AhfpVNKYEOhVqb9cZpu0fdNThplA/tB/Ts4PF/UsI+abl2n1IbSxUkhiF0OqDejEhk1n42Oqpw==}
engines: {node: '>=18.0.0'}
peerDependencies:
livekit-client: ^2.0.0
@ -6786,7 +6786,7 @@ snapshots:
deep-is@0.1.4: {}
deepfilternet3-noise-filter@1.3.0(livekit-client@2.20.0(@types/dom-mediacapture-record@1.0.22)):
deepfilternet3-noise-filter@1.2.1(livekit-client@2.20.0(@types/dom-mediacapture-record@1.0.22)):
dependencies:
livekit-client: 2.20.0(@types/dom-mediacapture-record@1.0.22)

View file

@ -1,2 +1,3 @@
- Move legal to extra onboarding package
- Add a bunch of tests
- Add packages/cache/ to handle caching