(fix): calls
(fix): deepfilternet3 (feat): remove noise gate logs (qol): update todo
This commit is contained in:
parent
92dfea7329
commit
76b64886da
11 changed files with 42 additions and 25 deletions
|
|
@ -275,8 +275,7 @@ function AppShell() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function CallInit() {
|
function CallInit() {
|
||||||
useInitializeCall();
|
return useInitializeCall();
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const rootRoute = createRootRoute({
|
const rootRoute = createRootRoute({
|
||||||
|
|
|
||||||
|
|
@ -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`
|
- Folder: `licenses/decimal.js-light@2.5.1`
|
||||||
- Source package dir: `apps/web/node_modules/decimal.js-light`
|
- 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)
|
- License: (Apache-2.0 OR MIT)
|
||||||
- Homepage: https://github.com/mezonai/mezon-noise-suppression#readme
|
- Homepage: https://github.com/mezonai/mezon-noise-suppression#readme
|
||||||
- Repository: git+https://github.com/mezonai/mezon-noise-suppression.git
|
- Repository: git+https://github.com/mezonai/mezon-noise-suppression.git
|
||||||
- Description: Custom audio processor with DeepFilterNet3 noise filtering integrated with LiveKit client
|
- Description: Custom audio processor with DeepFilterNet3 noise filtering integrated with LiveKit client
|
||||||
- Included files: LICENSE-APACHE, LICENSE-MIT
|
- 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`
|
- Source package dir: `packages/call/node_modules/deepfilternet3-noise-filter`
|
||||||
|
|
||||||
## detect-node-es@1.1.0
|
## detect-node-es@1.1.0
|
||||||
|
|
|
||||||
|
|
@ -2651,10 +2651,10 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"bomRef": "pkg:npm/deepfilternet3-noise-filter@1.3.0",
|
"bomRef": "pkg:npm/deepfilternet3-noise-filter@1.2.1",
|
||||||
"name": "deepfilternet3-noise-filter",
|
"name": "deepfilternet3-noise-filter",
|
||||||
"version": "1.3.0",
|
"version": "1.2.1",
|
||||||
"purl": "pkg:npm/deepfilternet3-noise-filter@1.3.0",
|
"purl": "pkg:npm/deepfilternet3-noise-filter@1.2.1",
|
||||||
"description": "Custom audio processor with DeepFilterNet3 noise filtering integrated with LiveKit client",
|
"description": "Custom audio processor with DeepFilterNet3 noise filtering integrated with LiveKit client",
|
||||||
"licenses": [
|
"licenses": [
|
||||||
{
|
{
|
||||||
|
|
@ -2676,7 +2676,7 @@
|
||||||
"properties": [
|
"properties": [
|
||||||
{
|
{
|
||||||
"name": "local:licenseFolder",
|
"name": "local:licenseFolder",
|
||||||
"value": "licenses/deepfilternet3-noise-filter@1.3.0"
|
"value": "licenses/deepfilternet3-noise-filter@1.2.1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "local:sourcePackageDir",
|
"name": "local:sourcePackageDir",
|
||||||
|
|
|
||||||
|
|
@ -368,7 +368,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "@radix-ui/react-slot",
|
"name": "@radix-ui/react-slot",
|
||||||
"version": "1.3.0",
|
"version": "1.2.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"homepage": "https://radix-ui.com/primitives",
|
"homepage": "https://radix-ui.com/primitives",
|
||||||
"repository": "git+https://github.com/radix-ui/primitives.git",
|
"repository": "git+https://github.com/radix-ui/primitives.git",
|
||||||
|
|
@ -1027,7 +1027,7 @@
|
||||||
"LICENSE-APACHE",
|
"LICENSE-APACHE",
|
||||||
"LICENSE-MIT"
|
"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"
|
"sourcePackageDir": "packages/call/node_modules/deepfilternet3-noise-filter"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
"@tensamin/mtp": "workspace:*",
|
"@tensamin/mtp": "workspace:*",
|
||||||
"@tensamin/ui": "*",
|
"@tensamin/ui": "*",
|
||||||
"@tensamin/user": "workspace:*",
|
"@tensamin/user": "workspace:*",
|
||||||
"deepfilternet3-noise-filter": "^1.2.1",
|
"deepfilternet3-noise-filter": "1.2.1",
|
||||||
"livekit-client": "^2.18.8",
|
"livekit-client": "^2.18.8",
|
||||||
"lucide-react": "^1.14.0",
|
"lucide-react": "^1.14.0",
|
||||||
"react": "^19.2.0",
|
"react": "^19.2.0",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import { log } from "@tensamin/shared/log";
|
|
||||||
import {
|
import {
|
||||||
clearSpeakingParticipants,
|
clearSpeakingParticipants,
|
||||||
removeSpeakingParticipant,
|
removeSpeakingParticipant,
|
||||||
|
|
@ -138,10 +137,8 @@ class SpeakingDetector {
|
||||||
const db = 20 * Math.log10(Math.max(rms, 0.0001));
|
const db = 20 * Math.log10(Math.max(rms, 0.0001));
|
||||||
|
|
||||||
if (!this.localMicGateClosed && db < this.gateThresholdStart) {
|
if (!this.localMicGateClosed && db < this.gateThresholdStart) {
|
||||||
log(3, "noise gate", "purple", "closed");
|
|
||||||
this.muteLocalTrack(true);
|
this.muteLocalTrack(true);
|
||||||
} else if (this.localMicGateClosed && db > this.gateThresholdEnd) {
|
} else if (this.localMicGateClosed && db > this.gateThresholdEnd) {
|
||||||
log(3, "noise gate", "purple", "opened");
|
|
||||||
this.muteLocalTrack(false);
|
this.muteLocalTrack(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -646,7 +646,7 @@ export async function openCallPage(callId: string) {
|
||||||
// Request the LiveKit token that authorizes this client to join a call.
|
// Request the LiveKit token that authorizes this client to join a call.
|
||||||
export async function getCallToken(callId: string): Promise<string> {
|
export async function getCallToken(callId: string): Promise<string> {
|
||||||
const response = await requireRuntime(useCall.getState().runtime)
|
const response = await requireRuntime(useCall.getState().runtime)
|
||||||
.send("call_token", {
|
.send("CallToken", {
|
||||||
CallId: callId,
|
CallId: callId,
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
@ -679,7 +679,7 @@ export async function sendCallInvite(userId: number) {
|
||||||
version: CALL_SECRET_VERSION,
|
version: CALL_SECRET_VERSION,
|
||||||
});
|
});
|
||||||
|
|
||||||
await runtime.send("call_invite", {
|
await runtime.send("CallInvite", {
|
||||||
ReceiverId: userId,
|
ReceiverId: userId,
|
||||||
CallId: callId,
|
CallId: callId,
|
||||||
CallSecret: {
|
CallSecret: {
|
||||||
|
|
@ -1222,7 +1222,7 @@ export function useInitializeCall() {
|
||||||
|
|
||||||
// listen to call invites
|
// listen to call invites
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
subscribePush(async (message) => {
|
return subscribePush(async (message) => {
|
||||||
if (message.type !== "CallInvite") return;
|
if (message.type !== "CallInvite") return;
|
||||||
|
|
||||||
const { CallId, CallSecret, SenderId } = message.data as {
|
const { CallId, CallSecret, SenderId } = message.data as {
|
||||||
|
|
@ -1231,7 +1231,15 @@ export function useInitializeCall() {
|
||||||
SenderId: number;
|
SenderId: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
showCallingScreen(CallId, CallSecret, SenderId);
|
if (SenderId === Number(await load("user_id"))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
showCallingScreen(
|
||||||
|
CallId,
|
||||||
|
normalizeWrappedCallSecret(CallSecret),
|
||||||
|
SenderId,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}, [load, subscribePush, showCallingScreen]);
|
}, [load, subscribePush, showCallingScreen]);
|
||||||
|
|
||||||
|
|
@ -1564,6 +1572,18 @@ export function useInitializeCall() {
|
||||||
|
|
||||||
send("CallData", { CallId: callId })
|
send("CallData", { CallId: callId })
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
|
if (data.type === "ErrorNotFound") {
|
||||||
|
setCurrentCallData({
|
||||||
|
UserIds: [],
|
||||||
|
exists: false,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.type.startsWith("Error")) {
|
||||||
|
throw new Error(`CallData failed: ${data.type}`);
|
||||||
|
}
|
||||||
|
|
||||||
setCurrentCallData({
|
setCurrentCallData({
|
||||||
...(data.data as z.infer<typeof mtp.CallData.response>),
|
...(data.data as z.infer<typeof mtp.CallData.response>),
|
||||||
exists: true,
|
exists: true,
|
||||||
|
|
|
||||||
10
pnpm-lock.yaml
generated
10
pnpm-lock.yaml
generated
|
|
@ -529,8 +529,8 @@ importers:
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../user
|
version: link:../user
|
||||||
deepfilternet3-noise-filter:
|
deepfilternet3-noise-filter:
|
||||||
specifier: ^1.2.1
|
specifier: 1.2.1
|
||||||
version: 1.3.0(livekit-client@2.20.0(@types/dom-mediacapture-record@1.0.22))
|
version: 1.2.1(livekit-client@2.20.0(@types/dom-mediacapture-record@1.0.22))
|
||||||
livekit-client:
|
livekit-client:
|
||||||
specifier: ^2.18.8
|
specifier: ^2.18.8
|
||||||
version: 2.20.0(@types/dom-mediacapture-record@1.0.22)
|
version: 2.20.0(@types/dom-mediacapture-record@1.0.22)
|
||||||
|
|
@ -2690,8 +2690,8 @@ packages:
|
||||||
deep-is@0.1.4:
|
deep-is@0.1.4:
|
||||||
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
|
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
|
||||||
|
|
||||||
deepfilternet3-noise-filter@1.3.0:
|
deepfilternet3-noise-filter@1.2.1:
|
||||||
resolution: {integrity: sha512-yYFUlPuvPguqcd/R6/OSsr0noGqlqOE50JkCWYHogk+PjLj9qrNgwTt5zKraVkKnw0l4+eXJagkz2SUWtUl4sQ==}
|
resolution: {integrity: sha512-OAyrHTDlUHH+AhfpVNKYEOhVqb9cZpu0fdNThplA/tB/Ts4PF/UsI+abl2n1IbSxUkhiF0OqDejEhk1n42Oqpw==}
|
||||||
engines: {node: '>=18.0.0'}
|
engines: {node: '>=18.0.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
livekit-client: ^2.0.0
|
livekit-client: ^2.0.0
|
||||||
|
|
@ -6786,7 +6786,7 @@ snapshots:
|
||||||
|
|
||||||
deep-is@0.1.4: {}
|
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:
|
dependencies:
|
||||||
livekit-client: 2.20.0(@types/dom-mediacapture-record@1.0.22)
|
livekit-client: 2.20.0(@types/dom-mediacapture-record@1.0.22)
|
||||||
|
|
||||||
|
|
|
||||||
1
todo.md
1
todo.md
|
|
@ -1,2 +1,3 @@
|
||||||
- Move legal to extra onboarding package
|
- Move legal to extra onboarding package
|
||||||
- Add a bunch of tests
|
- Add a bunch of tests
|
||||||
|
- Add packages/cache/ to handle caching
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue