Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.
This repository was archived by the owner on May 13, 2025. It is now read-only.

TypeError: device.audio.addProcessor is not a function #255

Description

@siyarammalav-cnel

When i am trying to add new audio processor show the following error

TypeError: device.audio.addProcessor is not a function

see example code:

function intitializeDevice() {

logDiv.classList.remove("hide");
log("Initializing device");
device = new Twilio.Device(token, {
  logLevel:1,
  // Set Opus as our preferred codec. Opus generally performs better, requiring less bandwidth and
  // providing better audio quality in restrained network conditions.
  codecPreferences: ["opus", "pcmu"],
});

addDeviceListeners(device);
const audioProcessor = new CustomAudioProcessor(openAiWs);
device.audio.addProcessor(audioProcessor);

// Device must be registered in order to receive incoming calls
device.register();

}

s1s

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions