Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

131
Views
How do I debug the output of this nodejs Transform?

I'm trying to get twilio streams connected to dialogflow cx but I keep getting a "no audio" error from dialogflow cx streamingdetectintent API.

How can I see what the output of this function is?

function createAudioRequestStream() {
  return new Transform({
    objectMode: true,
    transform: (chunk, encoding, callback) => {
      const msg = JSON.parse(chunk.toString("utf8"));
      // Only process media messages
      if (msg.event !== "media") {
        console.log("msg.event = "+ msg.event + " and not media");
        return callback();
      }
      // This is mulaw/8000 base64-encoded
      console.log("createAudioRequestStream " + msg.event.toString());
      console.log("createAudioRequestStream " + msg.media.payload.toString());
      return callback({ inputAudio: msg.media.payload }, { inputAudio: msg.media.payload });
      //return callback(null, { inputAudio: msg.media.payload });
    },
  });
}

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!