Update noise filter package name (#215)

* Update noise filter package name

* fix import
This commit is contained in:
lukasIO 2024-03-06 23:01:25 +01:00 committed by GitHub
parent 8f8880b02d
commit 0f602cd410
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 8 deletions

View file

@ -43,16 +43,16 @@ export function SettingsMenu(props: SettingsMenuProps) {
if (currentProcessor && !isNoiseFilterEnabled) {
micPublication.track.stopProcessor();
} else if (!currentProcessor && isNoiseFilterEnabled) {
import('@livekit/noise-filter')
.then(({ NoiseFilter, isNoiseFilterSupported }) => {
if (!isNoiseFilterSupported()) {
import('@livekit/krisp-noise-filter')
.then(({ KrispNoiseFilter, isKrispNoiseFilterSupported }) => {
if (!isKrispNoiseFilterSupported()) {
console.error('Enhanced noise filter is not supported for this browser');
setIsNoiseFilterEnabled(false);
return;
}
micPublication?.track
// @ts-ignore
?.setProcessor(NoiseFilter())
?.setProcessor(KrispNoiseFilter())
.then(() => console.log('successfully set noise filter'));
})
.catch((e) => console.error('Failed to load noise filter', e));

View file

@ -11,7 +11,7 @@
"dependencies": {
"@livekit/components-react": "2.0.2",
"@livekit/components-styles": "1.0.10",
"@livekit/noise-filter": "^0.1.3",
"@livekit/krisp-noise-filter": "^0.1.3",
"livekit-client": "2.0.5",
"livekit-server-sdk": "2.0.4",
"next": "14.1.0",

6
pnpm-lock.yaml generated
View file

@ -11,7 +11,7 @@ dependencies:
'@livekit/components-styles':
specifier: 1.0.10
version: 1.0.10
'@livekit/noise-filter':
'@livekit/krisp-noise-filter':
specifier: ^0.1.3
version: 0.1.3(livekit-client@2.0.5)
livekit-client:
@ -239,8 +239,8 @@ packages:
engines: {node: '>=18'}
dev: false
/@livekit/noise-filter@0.1.3(livekit-client@2.0.5):
resolution: {integrity: sha512-y5FVS8wOmDJ40ml3nqVJ2I40pFUwIx37B3XiLhPQrgXaY2saZpZebfN4D22XsbaEqPs5kCMQ82IqdLxRkQpbMA==}
/@livekit/krisp-noise-filter@0.1.3(livekit-client@2.0.5):
resolution: {integrity: sha512-wXWXJ52mXUasjOhilKmUd3YfXlgtAgdaL33AX2EhCvOLRnBC2qtH+J2+3LkRVZAlOVVIPta7yzj3z6mBzuK5Ow==}
peerDependencies:
livekit-client: ^2.0.2
dependencies: