()
| 20 | BYTES_PER_SAMPLE; // 960 bytes for 24000 Hz mono 16-bit |
| 21 | |
| 22 | export function createOpusEncoder() { |
| 23 | const enc = new Encoder({ |
| 24 | channels: CHANNELS, |
| 25 | sample_rate: SAMPLE_RATE, |
| 26 | application: "voip", |
| 27 | }); |
| 28 | |
| 29 | enc.expert_frame_duration = FRAME_DURATION; |
| 30 | enc.bitrate = 24000; |
| 31 | return enc; |
| 32 | } |
| 33 | |
| 34 | export function createOpusPacketizer( |
| 35 | sendPacket: (packet: Uint8Array) => void, |
no outgoing calls
no test coverage detected