@livekit/rtc-node 0.13.10 → 0.13.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/audio_filter.cjs +48 -0
  2. package/dist/audio_filter.cjs.map +1 -0
  3. package/dist/audio_filter.d.cts +5 -0
  4. package/dist/audio_filter.d.ts +5 -0
  5. package/dist/audio_filter.d.ts.map +1 -0
  6. package/dist/audio_filter.js +27 -0
  7. package/dist/audio_filter.js.map +1 -0
  8. package/dist/audio_stream.cjs +15 -5
  9. package/dist/audio_stream.cjs.map +1 -1
  10. package/dist/audio_stream.d.cts +15 -2
  11. package/dist/audio_stream.d.ts +15 -2
  12. package/dist/audio_stream.d.ts.map +1 -1
  13. package/dist/audio_stream.js +15 -5
  14. package/dist/audio_stream.js.map +1 -1
  15. package/dist/index.cjs +3 -0
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +2 -1
  18. package/dist/index.d.ts +2 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +2 -0
  21. package/dist/index.js.map +1 -1
  22. package/dist/proto/audio_frame_pb.cjs +312 -2
  23. package/dist/proto/audio_frame_pb.cjs.map +1 -1
  24. package/dist/proto/audio_frame_pb.d.cts +278 -1
  25. package/dist/proto/audio_frame_pb.d.ts +278 -1
  26. package/dist/proto/audio_frame_pb.d.ts.map +1 -1
  27. package/dist/proto/audio_frame_pb.js +301 -2
  28. package/dist/proto/audio_frame_pb.js.map +1 -1
  29. package/dist/proto/ffi_pb.cjs +12 -2
  30. package/dist/proto/ffi_pb.cjs.map +1 -1
  31. package/dist/proto/ffi_pb.d.cts +65 -1
  32. package/dist/proto/ffi_pb.d.ts +65 -1
  33. package/dist/proto/ffi_pb.d.ts.map +1 -1
  34. package/dist/proto/ffi_pb.js +13 -3
  35. package/dist/proto/ffi_pb.js.map +1 -1
  36. package/dist/version.cjs +1 -1
  37. package/dist/version.cjs.map +1 -1
  38. package/dist/version.d.cts +1 -1
  39. package/dist/version.d.ts +1 -1
  40. package/dist/version.js +1 -1
  41. package/dist/version.js.map +1 -1
  42. package/package.json +6 -6
  43. package/src/audio_filter.ts +29 -0
  44. package/src/audio_stream.ts +38 -5
  45. package/src/index.ts +2 -0
  46. package/src/proto/audio_frame_pb.ts +533 -0
  47. package/src/proto/ffi_pb.ts +75 -1
  48. package/src/version.ts +1 -1
@@ -9,6 +9,17 @@ import type { AudioStreamInfo, NewAudioStreamResponse } from './proto/audio_fram
9
9
  import { AudioStreamType, NewAudioStreamRequest } from './proto/audio_frame_pb.js';
10
10
  import type { Track } from './track.js';
11
11
 
12
+ export interface AudioStreamOptions {
13
+ noiseCancellation?: NoiseCancellationOptions;
14
+ sampleRate?: number;
15
+ numChannels?: number;
16
+ }
17
+
18
+ export interface NoiseCancellationOptions {
19
+ moduleId: string;
20
+ options: Record<string, any>;
21
+ }
22
+
12
23
  export class AudioStream implements AsyncIterableIterator<AudioFrame> {
13
24
  /** @internal */
14
25
  info: AudioStreamInfo;
@@ -24,17 +35,39 @@ export class AudioStream implements AsyncIterableIterator<AudioFrame> {
24
35
  track: Track;
25
36
  sampleRate: number;
26
37
  numChannels: number;
38
+ ncOptions?: NoiseCancellationOptions;
39
+
40
+ constructor(track: Track);
41
+ constructor(track: Track, sampleRate: number);
42
+ constructor(track: Track, sampleRate: number, numChannels: number);
43
+ constructor(track: Track, options: AudioStreamOptions);
27
44
 
28
- constructor(track: Track, sampleRate: number = 48000, numChannels: number = 1) {
45
+ constructor(
46
+ track: Track,
47
+ sampleRateOrOptions?: number | AudioStreamOptions,
48
+ numChannels?: number,
49
+ ) {
29
50
  this.track = track;
30
- this.sampleRate = sampleRate;
31
- this.numChannels = numChannels;
51
+ if (sampleRateOrOptions !== undefined && typeof sampleRateOrOptions !== 'number') {
52
+ this.sampleRate = sampleRateOrOptions.sampleRate ?? 48000;
53
+ this.numChannels = sampleRateOrOptions.numChannels ?? 1;
54
+ this.ncOptions = sampleRateOrOptions.noiseCancellation;
55
+ } else {
56
+ this.sampleRate = (sampleRateOrOptions as number) ?? 48000;
57
+ this.numChannels = numChannels ?? 1;
58
+ }
32
59
 
33
60
  const req = new NewAudioStreamRequest({
34
61
  type: AudioStreamType.AUDIO_STREAM_NATIVE,
35
62
  trackHandle: track.ffi_handle.handle,
36
- sampleRate: sampleRate,
37
- numChannels: numChannels,
63
+ sampleRate: this.sampleRate,
64
+ numChannels: this.numChannels,
65
+ ...(this.ncOptions
66
+ ? {
67
+ audioFilterModuleId: this.ncOptions.moduleId,
68
+ audioFilterOptions: JSON.stringify(this.ncOptions.options),
69
+ }
70
+ : {}),
38
71
  });
39
72
 
40
73
  const res = FfiClient.instance.request<NewAudioStreamResponse>({
package/src/index.ts CHANGED
@@ -6,6 +6,8 @@ export { AudioFrame, combineAudioFrames } from './audio_frame.js';
6
6
  export { AudioResampler, AudioResamplerQuality } from './audio_resampler.js';
7
7
  export { AudioSource } from './audio_source.js';
8
8
  export { AudioStream } from './audio_stream.js';
9
+ export type { NoiseCancellationOptions } from './audio_stream.js';
10
+ export { AudioFilter } from './audio_filter.js';
9
11
  export * from './data_streams/index.js';
10
12
  export { E2EEManager, FrameCryptor, KeyProvider } from './e2ee.js';
11
13
  export type { E2EEOptions, KeyProviderOptions } from './e2ee.js';
@@ -199,6 +199,18 @@ export class NewAudioStreamRequest extends Message<NewAudioStreamRequest> {
199
199
  */
200
200
  numChannels?: number;
201
201
 
202
+ /**
203
+ * Unique identifier passed in LoadAudioFilterPluginRequest
204
+ *
205
+ * @generated from field: optional string audio_filter_module_id = 5;
206
+ */
207
+ audioFilterModuleId?: string;
208
+
209
+ /**
210
+ * @generated from field: optional string audio_filter_options = 6;
211
+ */
212
+ audioFilterOptions?: string;
213
+
202
214
  constructor(data?: PartialMessage<NewAudioStreamRequest>) {
203
215
  super();
204
216
  proto2.util.initPartial(data, this);
@@ -211,6 +223,8 @@ export class NewAudioStreamRequest extends Message<NewAudioStreamRequest> {
211
223
  { no: 2, name: "type", kind: "enum", T: proto2.getEnumType(AudioStreamType), req: true },
212
224
  { no: 3, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
213
225
  { no: 4, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
226
+ { no: 5, name: "audio_filter_module_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
227
+ { no: 6, name: "audio_filter_options", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
214
228
  ]);
215
229
 
216
230
  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): NewAudioStreamRequest {
@@ -296,6 +310,16 @@ export class AudioStreamFromParticipantRequest extends Message<AudioStreamFromPa
296
310
  */
297
311
  numChannels?: number;
298
312
 
313
+ /**
314
+ * @generated from field: optional string audio_filter_module_id = 7;
315
+ */
316
+ audioFilterModuleId?: string;
317
+
318
+ /**
319
+ * @generated from field: optional string audio_filter_options = 8;
320
+ */
321
+ audioFilterOptions?: string;
322
+
299
323
  constructor(data?: PartialMessage<AudioStreamFromParticipantRequest>) {
300
324
  super();
301
325
  proto2.util.initPartial(data, this);
@@ -309,6 +333,8 @@ export class AudioStreamFromParticipantRequest extends Message<AudioStreamFromPa
309
333
  { no: 3, name: "track_source", kind: "enum", T: proto2.getEnumType(TrackSource), opt: true },
310
334
  { no: 5, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
311
335
  { no: 6, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
336
+ { no: 7, name: "audio_filter_module_id", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
337
+ { no: 8, name: "audio_filter_options", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
312
338
  ]);
313
339
 
314
340
  static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AudioStreamFromParticipantRequest {
@@ -823,6 +849,382 @@ export class RemixAndResampleResponse extends Message<RemixAndResampleResponse>
823
849
  }
824
850
  }
825
851
 
852
+ /**
853
+ * @generated from message livekit.proto.NewApmRequest
854
+ */
855
+ export class NewApmRequest extends Message<NewApmRequest> {
856
+ /**
857
+ * @generated from field: required bool echo_canceller_enabled = 1;
858
+ */
859
+ echoCancellerEnabled?: boolean;
860
+
861
+ /**
862
+ * @generated from field: required bool gain_controller_enabled = 2;
863
+ */
864
+ gainControllerEnabled?: boolean;
865
+
866
+ /**
867
+ * @generated from field: required bool high_pass_filter_enabled = 3;
868
+ */
869
+ highPassFilterEnabled?: boolean;
870
+
871
+ /**
872
+ * @generated from field: required bool noise_suppression_enabled = 4;
873
+ */
874
+ noiseSuppressionEnabled?: boolean;
875
+
876
+ constructor(data?: PartialMessage<NewApmRequest>) {
877
+ super();
878
+ proto2.util.initPartial(data, this);
879
+ }
880
+
881
+ static readonly runtime: typeof proto2 = proto2;
882
+ static readonly typeName = "livekit.proto.NewApmRequest";
883
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
884
+ { no: 1, name: "echo_canceller_enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true },
885
+ { no: 2, name: "gain_controller_enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true },
886
+ { no: 3, name: "high_pass_filter_enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true },
887
+ { no: 4, name: "noise_suppression_enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */, req: true },
888
+ ]);
889
+
890
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): NewApmRequest {
891
+ return new NewApmRequest().fromBinary(bytes, options);
892
+ }
893
+
894
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): NewApmRequest {
895
+ return new NewApmRequest().fromJson(jsonValue, options);
896
+ }
897
+
898
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): NewApmRequest {
899
+ return new NewApmRequest().fromJsonString(jsonString, options);
900
+ }
901
+
902
+ static equals(a: NewApmRequest | PlainMessage<NewApmRequest> | undefined, b: NewApmRequest | PlainMessage<NewApmRequest> | undefined): boolean {
903
+ return proto2.util.equals(NewApmRequest, a, b);
904
+ }
905
+ }
906
+
907
+ /**
908
+ * @generated from message livekit.proto.NewApmResponse
909
+ */
910
+ export class NewApmResponse extends Message<NewApmResponse> {
911
+ /**
912
+ * @generated from field: required livekit.proto.OwnedApm apm = 1;
913
+ */
914
+ apm?: OwnedApm;
915
+
916
+ constructor(data?: PartialMessage<NewApmResponse>) {
917
+ super();
918
+ proto2.util.initPartial(data, this);
919
+ }
920
+
921
+ static readonly runtime: typeof proto2 = proto2;
922
+ static readonly typeName = "livekit.proto.NewApmResponse";
923
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
924
+ { no: 1, name: "apm", kind: "message", T: OwnedApm, req: true },
925
+ ]);
926
+
927
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): NewApmResponse {
928
+ return new NewApmResponse().fromBinary(bytes, options);
929
+ }
930
+
931
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): NewApmResponse {
932
+ return new NewApmResponse().fromJson(jsonValue, options);
933
+ }
934
+
935
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): NewApmResponse {
936
+ return new NewApmResponse().fromJsonString(jsonString, options);
937
+ }
938
+
939
+ static equals(a: NewApmResponse | PlainMessage<NewApmResponse> | undefined, b: NewApmResponse | PlainMessage<NewApmResponse> | undefined): boolean {
940
+ return proto2.util.equals(NewApmResponse, a, b);
941
+ }
942
+ }
943
+
944
+ /**
945
+ * @generated from message livekit.proto.ApmProcessStreamRequest
946
+ */
947
+ export class ApmProcessStreamRequest extends Message<ApmProcessStreamRequest> {
948
+ /**
949
+ * @generated from field: required uint64 apm_handle = 1;
950
+ */
951
+ apmHandle?: bigint;
952
+
953
+ /**
954
+ * *mut i16
955
+ *
956
+ * @generated from field: required uint64 data_ptr = 2;
957
+ */
958
+ dataPtr?: bigint;
959
+
960
+ /**
961
+ * in bytes
962
+ *
963
+ * @generated from field: required uint32 size = 3;
964
+ */
965
+ size?: number;
966
+
967
+ /**
968
+ * @generated from field: required uint32 sample_rate = 4;
969
+ */
970
+ sampleRate?: number;
971
+
972
+ /**
973
+ * @generated from field: required uint32 num_channels = 5;
974
+ */
975
+ numChannels?: number;
976
+
977
+ constructor(data?: PartialMessage<ApmProcessStreamRequest>) {
978
+ super();
979
+ proto2.util.initPartial(data, this);
980
+ }
981
+
982
+ static readonly runtime: typeof proto2 = proto2;
983
+ static readonly typeName = "livekit.proto.ApmProcessStreamRequest";
984
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
985
+ { no: 1, name: "apm_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
986
+ { no: 2, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
987
+ { no: 3, name: "size", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true },
988
+ { no: 4, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true },
989
+ { no: 5, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true },
990
+ ]);
991
+
992
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ApmProcessStreamRequest {
993
+ return new ApmProcessStreamRequest().fromBinary(bytes, options);
994
+ }
995
+
996
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ApmProcessStreamRequest {
997
+ return new ApmProcessStreamRequest().fromJson(jsonValue, options);
998
+ }
999
+
1000
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ApmProcessStreamRequest {
1001
+ return new ApmProcessStreamRequest().fromJsonString(jsonString, options);
1002
+ }
1003
+
1004
+ static equals(a: ApmProcessStreamRequest | PlainMessage<ApmProcessStreamRequest> | undefined, b: ApmProcessStreamRequest | PlainMessage<ApmProcessStreamRequest> | undefined): boolean {
1005
+ return proto2.util.equals(ApmProcessStreamRequest, a, b);
1006
+ }
1007
+ }
1008
+
1009
+ /**
1010
+ * @generated from message livekit.proto.ApmProcessStreamResponse
1011
+ */
1012
+ export class ApmProcessStreamResponse extends Message<ApmProcessStreamResponse> {
1013
+ /**
1014
+ * @generated from field: optional string error = 1;
1015
+ */
1016
+ error?: string;
1017
+
1018
+ constructor(data?: PartialMessage<ApmProcessStreamResponse>) {
1019
+ super();
1020
+ proto2.util.initPartial(data, this);
1021
+ }
1022
+
1023
+ static readonly runtime: typeof proto2 = proto2;
1024
+ static readonly typeName = "livekit.proto.ApmProcessStreamResponse";
1025
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1026
+ { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1027
+ ]);
1028
+
1029
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ApmProcessStreamResponse {
1030
+ return new ApmProcessStreamResponse().fromBinary(bytes, options);
1031
+ }
1032
+
1033
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ApmProcessStreamResponse {
1034
+ return new ApmProcessStreamResponse().fromJson(jsonValue, options);
1035
+ }
1036
+
1037
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ApmProcessStreamResponse {
1038
+ return new ApmProcessStreamResponse().fromJsonString(jsonString, options);
1039
+ }
1040
+
1041
+ static equals(a: ApmProcessStreamResponse | PlainMessage<ApmProcessStreamResponse> | undefined, b: ApmProcessStreamResponse | PlainMessage<ApmProcessStreamResponse> | undefined): boolean {
1042
+ return proto2.util.equals(ApmProcessStreamResponse, a, b);
1043
+ }
1044
+ }
1045
+
1046
+ /**
1047
+ * @generated from message livekit.proto.ApmProcessReverseStreamRequest
1048
+ */
1049
+ export class ApmProcessReverseStreamRequest extends Message<ApmProcessReverseStreamRequest> {
1050
+ /**
1051
+ * @generated from field: required uint64 apm_handle = 1;
1052
+ */
1053
+ apmHandle?: bigint;
1054
+
1055
+ /**
1056
+ * *mut i16
1057
+ *
1058
+ * @generated from field: required uint64 data_ptr = 2;
1059
+ */
1060
+ dataPtr?: bigint;
1061
+
1062
+ /**
1063
+ * in bytes
1064
+ *
1065
+ * @generated from field: required uint32 size = 3;
1066
+ */
1067
+ size?: number;
1068
+
1069
+ /**
1070
+ * @generated from field: required uint32 sample_rate = 4;
1071
+ */
1072
+ sampleRate?: number;
1073
+
1074
+ /**
1075
+ * @generated from field: required uint32 num_channels = 5;
1076
+ */
1077
+ numChannels?: number;
1078
+
1079
+ constructor(data?: PartialMessage<ApmProcessReverseStreamRequest>) {
1080
+ super();
1081
+ proto2.util.initPartial(data, this);
1082
+ }
1083
+
1084
+ static readonly runtime: typeof proto2 = proto2;
1085
+ static readonly typeName = "livekit.proto.ApmProcessReverseStreamRequest";
1086
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1087
+ { no: 1, name: "apm_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1088
+ { no: 2, name: "data_ptr", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1089
+ { no: 3, name: "size", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true },
1090
+ { no: 4, name: "sample_rate", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true },
1091
+ { no: 5, name: "num_channels", kind: "scalar", T: 13 /* ScalarType.UINT32 */, req: true },
1092
+ ]);
1093
+
1094
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ApmProcessReverseStreamRequest {
1095
+ return new ApmProcessReverseStreamRequest().fromBinary(bytes, options);
1096
+ }
1097
+
1098
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ApmProcessReverseStreamRequest {
1099
+ return new ApmProcessReverseStreamRequest().fromJson(jsonValue, options);
1100
+ }
1101
+
1102
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ApmProcessReverseStreamRequest {
1103
+ return new ApmProcessReverseStreamRequest().fromJsonString(jsonString, options);
1104
+ }
1105
+
1106
+ static equals(a: ApmProcessReverseStreamRequest | PlainMessage<ApmProcessReverseStreamRequest> | undefined, b: ApmProcessReverseStreamRequest | PlainMessage<ApmProcessReverseStreamRequest> | undefined): boolean {
1107
+ return proto2.util.equals(ApmProcessReverseStreamRequest, a, b);
1108
+ }
1109
+ }
1110
+
1111
+ /**
1112
+ * @generated from message livekit.proto.ApmProcessReverseStreamResponse
1113
+ */
1114
+ export class ApmProcessReverseStreamResponse extends Message<ApmProcessReverseStreamResponse> {
1115
+ /**
1116
+ * @generated from field: optional string error = 1;
1117
+ */
1118
+ error?: string;
1119
+
1120
+ constructor(data?: PartialMessage<ApmProcessReverseStreamResponse>) {
1121
+ super();
1122
+ proto2.util.initPartial(data, this);
1123
+ }
1124
+
1125
+ static readonly runtime: typeof proto2 = proto2;
1126
+ static readonly typeName = "livekit.proto.ApmProcessReverseStreamResponse";
1127
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1128
+ { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1129
+ ]);
1130
+
1131
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ApmProcessReverseStreamResponse {
1132
+ return new ApmProcessReverseStreamResponse().fromBinary(bytes, options);
1133
+ }
1134
+
1135
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ApmProcessReverseStreamResponse {
1136
+ return new ApmProcessReverseStreamResponse().fromJson(jsonValue, options);
1137
+ }
1138
+
1139
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ApmProcessReverseStreamResponse {
1140
+ return new ApmProcessReverseStreamResponse().fromJsonString(jsonString, options);
1141
+ }
1142
+
1143
+ static equals(a: ApmProcessReverseStreamResponse | PlainMessage<ApmProcessReverseStreamResponse> | undefined, b: ApmProcessReverseStreamResponse | PlainMessage<ApmProcessReverseStreamResponse> | undefined): boolean {
1144
+ return proto2.util.equals(ApmProcessReverseStreamResponse, a, b);
1145
+ }
1146
+ }
1147
+
1148
+ /**
1149
+ * @generated from message livekit.proto.ApmSetStreamDelayRequest
1150
+ */
1151
+ export class ApmSetStreamDelayRequest extends Message<ApmSetStreamDelayRequest> {
1152
+ /**
1153
+ * @generated from field: required uint64 apm_handle = 1;
1154
+ */
1155
+ apmHandle?: bigint;
1156
+
1157
+ /**
1158
+ * @generated from field: required int32 delay_ms = 2;
1159
+ */
1160
+ delayMs?: number;
1161
+
1162
+ constructor(data?: PartialMessage<ApmSetStreamDelayRequest>) {
1163
+ super();
1164
+ proto2.util.initPartial(data, this);
1165
+ }
1166
+
1167
+ static readonly runtime: typeof proto2 = proto2;
1168
+ static readonly typeName = "livekit.proto.ApmSetStreamDelayRequest";
1169
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1170
+ { no: 1, name: "apm_handle", kind: "scalar", T: 4 /* ScalarType.UINT64 */, req: true },
1171
+ { no: 2, name: "delay_ms", kind: "scalar", T: 5 /* ScalarType.INT32 */, req: true },
1172
+ ]);
1173
+
1174
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ApmSetStreamDelayRequest {
1175
+ return new ApmSetStreamDelayRequest().fromBinary(bytes, options);
1176
+ }
1177
+
1178
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ApmSetStreamDelayRequest {
1179
+ return new ApmSetStreamDelayRequest().fromJson(jsonValue, options);
1180
+ }
1181
+
1182
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ApmSetStreamDelayRequest {
1183
+ return new ApmSetStreamDelayRequest().fromJsonString(jsonString, options);
1184
+ }
1185
+
1186
+ static equals(a: ApmSetStreamDelayRequest | PlainMessage<ApmSetStreamDelayRequest> | undefined, b: ApmSetStreamDelayRequest | PlainMessage<ApmSetStreamDelayRequest> | undefined): boolean {
1187
+ return proto2.util.equals(ApmSetStreamDelayRequest, a, b);
1188
+ }
1189
+ }
1190
+
1191
+ /**
1192
+ * @generated from message livekit.proto.ApmSetStreamDelayResponse
1193
+ */
1194
+ export class ApmSetStreamDelayResponse extends Message<ApmSetStreamDelayResponse> {
1195
+ /**
1196
+ * @generated from field: optional string error = 1;
1197
+ */
1198
+ error?: string;
1199
+
1200
+ constructor(data?: PartialMessage<ApmSetStreamDelayResponse>) {
1201
+ super();
1202
+ proto2.util.initPartial(data, this);
1203
+ }
1204
+
1205
+ static readonly runtime: typeof proto2 = proto2;
1206
+ static readonly typeName = "livekit.proto.ApmSetStreamDelayResponse";
1207
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
1208
+ { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
1209
+ ]);
1210
+
1211
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ApmSetStreamDelayResponse {
1212
+ return new ApmSetStreamDelayResponse().fromBinary(bytes, options);
1213
+ }
1214
+
1215
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ApmSetStreamDelayResponse {
1216
+ return new ApmSetStreamDelayResponse().fromJson(jsonValue, options);
1217
+ }
1218
+
1219
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ApmSetStreamDelayResponse {
1220
+ return new ApmSetStreamDelayResponse().fromJsonString(jsonString, options);
1221
+ }
1222
+
1223
+ static equals(a: ApmSetStreamDelayResponse | PlainMessage<ApmSetStreamDelayResponse> | undefined, b: ApmSetStreamDelayResponse | PlainMessage<ApmSetStreamDelayResponse> | undefined): boolean {
1224
+ return proto2.util.equals(ApmSetStreamDelayResponse, a, b);
1225
+ }
1226
+ }
1227
+
826
1228
  /**
827
1229
  * @generated from message livekit.proto.NewSoxResamplerRequest
828
1230
  */
@@ -1649,6 +2051,43 @@ export class OwnedAudioResampler extends Message<OwnedAudioResampler> {
1649
2051
  }
1650
2052
  }
1651
2053
 
2054
+ /**
2055
+ * @generated from message livekit.proto.OwnedApm
2056
+ */
2057
+ export class OwnedApm extends Message<OwnedApm> {
2058
+ /**
2059
+ * @generated from field: required livekit.proto.FfiOwnedHandle handle = 1;
2060
+ */
2061
+ handle?: FfiOwnedHandle;
2062
+
2063
+ constructor(data?: PartialMessage<OwnedApm>) {
2064
+ super();
2065
+ proto2.util.initPartial(data, this);
2066
+ }
2067
+
2068
+ static readonly runtime: typeof proto2 = proto2;
2069
+ static readonly typeName = "livekit.proto.OwnedApm";
2070
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
2071
+ { no: 1, name: "handle", kind: "message", T: FfiOwnedHandle, req: true },
2072
+ ]);
2073
+
2074
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): OwnedApm {
2075
+ return new OwnedApm().fromBinary(bytes, options);
2076
+ }
2077
+
2078
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): OwnedApm {
2079
+ return new OwnedApm().fromJson(jsonValue, options);
2080
+ }
2081
+
2082
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): OwnedApm {
2083
+ return new OwnedApm().fromJsonString(jsonString, options);
2084
+ }
2085
+
2086
+ static equals(a: OwnedApm | PlainMessage<OwnedApm> | undefined, b: OwnedApm | PlainMessage<OwnedApm> | undefined): boolean {
2087
+ return proto2.util.equals(OwnedApm, a, b);
2088
+ }
2089
+ }
2090
+
1652
2091
  /**
1653
2092
  * @generated from message livekit.proto.SoxResamplerInfo
1654
2093
  */
@@ -1723,3 +2162,97 @@ export class OwnedSoxResampler extends Message<OwnedSoxResampler> {
1723
2162
  }
1724
2163
  }
1725
2164
 
2165
+ /**
2166
+ * Audio Filter Plugin
2167
+ *
2168
+ * @generated from message livekit.proto.LoadAudioFilterPluginRequest
2169
+ */
2170
+ export class LoadAudioFilterPluginRequest extends Message<LoadAudioFilterPluginRequest> {
2171
+ /**
2172
+ * path for ffi audio filter plugin
2173
+ *
2174
+ * @generated from field: required string plugin_path = 1;
2175
+ */
2176
+ pluginPath?: string;
2177
+
2178
+ /**
2179
+ * Optional: paths for dependency dylibs
2180
+ *
2181
+ * @generated from field: repeated string dependencies = 2;
2182
+ */
2183
+ dependencies: string[] = [];
2184
+
2185
+ /**
2186
+ * Unique identifier of the plugin
2187
+ *
2188
+ * @generated from field: required string module_id = 3;
2189
+ */
2190
+ moduleId?: string;
2191
+
2192
+ constructor(data?: PartialMessage<LoadAudioFilterPluginRequest>) {
2193
+ super();
2194
+ proto2.util.initPartial(data, this);
2195
+ }
2196
+
2197
+ static readonly runtime: typeof proto2 = proto2;
2198
+ static readonly typeName = "livekit.proto.LoadAudioFilterPluginRequest";
2199
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
2200
+ { no: 1, name: "plugin_path", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
2201
+ { no: 2, name: "dependencies", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
2202
+ { no: 3, name: "module_id", kind: "scalar", T: 9 /* ScalarType.STRING */, req: true },
2203
+ ]);
2204
+
2205
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LoadAudioFilterPluginRequest {
2206
+ return new LoadAudioFilterPluginRequest().fromBinary(bytes, options);
2207
+ }
2208
+
2209
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LoadAudioFilterPluginRequest {
2210
+ return new LoadAudioFilterPluginRequest().fromJson(jsonValue, options);
2211
+ }
2212
+
2213
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LoadAudioFilterPluginRequest {
2214
+ return new LoadAudioFilterPluginRequest().fromJsonString(jsonString, options);
2215
+ }
2216
+
2217
+ static equals(a: LoadAudioFilterPluginRequest | PlainMessage<LoadAudioFilterPluginRequest> | undefined, b: LoadAudioFilterPluginRequest | PlainMessage<LoadAudioFilterPluginRequest> | undefined): boolean {
2218
+ return proto2.util.equals(LoadAudioFilterPluginRequest, a, b);
2219
+ }
2220
+ }
2221
+
2222
+ /**
2223
+ * @generated from message livekit.proto.LoadAudioFilterPluginResponse
2224
+ */
2225
+ export class LoadAudioFilterPluginResponse extends Message<LoadAudioFilterPluginResponse> {
2226
+ /**
2227
+ * @generated from field: optional string error = 1;
2228
+ */
2229
+ error?: string;
2230
+
2231
+ constructor(data?: PartialMessage<LoadAudioFilterPluginResponse>) {
2232
+ super();
2233
+ proto2.util.initPartial(data, this);
2234
+ }
2235
+
2236
+ static readonly runtime: typeof proto2 = proto2;
2237
+ static readonly typeName = "livekit.proto.LoadAudioFilterPluginResponse";
2238
+ static readonly fields: FieldList = proto2.util.newFieldList(() => [
2239
+ { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
2240
+ ]);
2241
+
2242
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LoadAudioFilterPluginResponse {
2243
+ return new LoadAudioFilterPluginResponse().fromBinary(bytes, options);
2244
+ }
2245
+
2246
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LoadAudioFilterPluginResponse {
2247
+ return new LoadAudioFilterPluginResponse().fromJson(jsonValue, options);
2248
+ }
2249
+
2250
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LoadAudioFilterPluginResponse {
2251
+ return new LoadAudioFilterPluginResponse().fromJsonString(jsonString, options);
2252
+ }
2253
+
2254
+ static equals(a: LoadAudioFilterPluginResponse | PlainMessage<LoadAudioFilterPluginResponse> | undefined, b: LoadAudioFilterPluginResponse | PlainMessage<LoadAudioFilterPluginResponse> | undefined): boolean {
2255
+ return proto2.util.equals(LoadAudioFilterPluginResponse, a, b);
2256
+ }
2257
+ }
2258
+