MCPcopy Create free account
hub / github.com/akdeb/ElatoAI / createOpusEncoder

Function createOpusEncoder

server/deno/utils.ts:22–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20 BYTES_PER_SAMPLE; // 960 bytes for 24000 Hz mono 16-bit
21
22export 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
34export function createOpusPacketizer(
35 sendPacket: (packet: Uint8Array) => void,

Callers 1

createOpusPacketizerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected