Hey, is it possible to either modify the SDK so not only you expose the AudioContext but also the input MediaStreamTrack or at least attach the underlying audio HTML elements . Right now it's impossible to do any volume control or transformations on the agent.
private handleAudioEvents(startCallConfig: StartCallConfig): void {
this.room.on(
RoomEvent.TrackSubscribed,
(
track: RemoteTrack,
publication: RemoteTrackPublication,
participant: RemoteParticipant,
) => {
if (track.kind === Track.Kind.Audio) {
if (
publication.trackName === "agent_audio" &&
track instanceof RemoteAudioTrack &&
startCallConfig.emitRawAudioSamples
) {
this.analyzerComponent = createAudioAnalyser(track);
this.captureAudioFrame = window.requestAnimationFrame(() =>
this.captureAudioSamples(),
);
}
// Start playing audio
/*CURRENT*/
track.attach(); // Currently in the sdk
/*SUGGESTED*/
document.body.append(track.attach()); // Exposes the underlying audio track for better control
}
},
);
}
Hey, is it possible to either modify the SDK so not only you expose the AudioContext but also the input MediaStreamTrack or at least attach the underlying audio HTML elements . Right now it's impossible to do any volume control or transformations on the agent.