React widget is not mounted on iOS

I’m creating a widget for 3rd-party sites.
It correctly loads from S3 on desktop and Android, but there’s an issue with iOS.
The widget is not loading in both Safari and Chrome, and there are not error messages in a console.
I think that there might be an error in the loading script:

<script>
  ;(function(document, url, apiKey) {
    var link = document.createElement('link')
    link.rel = 'stylesheet'
    link.href = `${url}/index.css?apiKey=${apiKey}`
    var head = document.getElementsByTagName('head')[0]
    head.parentNode.insertBefore(link, head)

    var script = document.createElement('script')
    script.src = `${url}/index.js?apiKey=${apiKey}`
    script.async = true
    var entryScript = document.getElementsByTagName('script')[0]
    entryScript.parentNode.insertBefore(script, entryScript)
  })(document, 'http://localhost:8080', '31805389-c240-4d42-8ff9-2cc30f753212')
</script>

The link to a repo with the demo:
https://github.com/pshepelenko/widget-demo-public

Spotify embed toggle play and pause button

I can’t seem to toggle the play button of spotify’s iframe programmatically through javascript.

I am currently following this link here but no luck. Though I am very new to javascript and I was only trying to recreate the code provided in the answer/comment section.

I would like to be able to toggle the play button of a track or playlist.

Here are the iframe embed code:
Example Playlist:

<iframe style="border-radius:12px" src="https://open.spotify.com/embed/playlist/37i9dQZF1DX3YSRoSdA634?utm_source=generator" width="100%" height="380" frameBorder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture"></iframe>

Example Track:

<iframe style="border-radius:12px" src="https://open.spotify.com/embed/track/4AFwnrH5atiJoAd5xS5QtR?utm_source=generator" width="100%" height="380" frameBorder="0" allowfullscreen="" allow="autoplay; clipboard-write; encrypted-media; fullscreen; picture-in-picture"></iframe>

React; how to gather user state input and append to new component on submit

import './App.css';
import GoalBox from './Components/GoalBox';
import { useState, useEffect, useRef } from 'react';



function App() {
  const [value, setValue] = useState('')

  const inputReset = useRef(null)

  let arr = [];

  const submitValue = () => {
    const todoList = {
      'todo': value
    }
    console.log(todoList);
    inputReset.current.value = ''; // resets input field
    
    arr.push(todoList)
    console.log('todo array', arr)
  }

  return (
    <div className="App">
      <h1>List of things to do</h1>
      <input ref={inputReset} onChange={(e) => setValue(e.target.value)} />
      <button onClick={submitValue}>Add New To do</button>
    </div>
  );
}

export default App;

    So I have a functional component here, and I have useState setting the value of ‘value’ upon each button click. That works. What doesn’t work is getting more than one value into my array. I have tried many ways, more than I want to list…
    I want an array of let’s say, 7 items of things to do, which I will then pass as props to and have THAT component append the DOM with a new card stating the todo items…directly after input submission…
    In vanilla JS I have achieved this simply by using document.createElement(‘div’).innerHTML = <p>${input.value}</p> (summarized)
But I cannot figure out how to do this in react…Any help, mainly including where I am misunderstanding React usage, would be oh so great!

Contact form using PHP mailer

i am trying to add contact form using PHP mailer. when someone fill the form i should get in my mail and as well as the visitor who filed the form should get mail that his submission is successful.

Currently using

PHP code :

<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
/*
Tested working with PHP5.4 and above (including PHP 7 )

 */
require_once './vendor/autoload.php';

use FormGuideHandlxFormHandler;


$pp = new FormHandler();

$validator = $pp->getValidator();
$validator->fields(['Name','Email'])->areRequired()->maxLength(50);
$validator->field('Email')->isEmail();
$validator->field('Message')->maxLength(6000);




$pp->sendEmailTo('[email protected]'); // ← Your email here

echo $pp->process($_POST);

HTML Code :

<script>
$(function()
{
    function after_form_submitted(data)
    {
        if(data.result == 'success')
        {
            $('form#reused_form').hide();
            $('#success_message').show();
            $('#error_message').hide();
        }
        else
        {
            $('#error_message').append('<ul></ul>');

            jQuery.each(data.errors,function(key,val)
            {
                $('#error_message ul').append('<li>'+key+':'+val+'</li>');
            });
            $('#success_message').hide();
            $('#error_message').show();

            //reverse the response on the button
            $('button[type="button"]', $form).each(function()
            {
                $btn = $(this);
                label = $btn.prop('orig_label');
                if(label)
                {
                    $btn.prop('type','submit' );
                    $btn.text(label);
                    $btn.prop('orig_label','');
                }
            });

        }//else
    }

    $('#reused_form').submit(function(e)
      {
        e.preventDefault();

        $form = $(this);
        //show some response on the button
        $('button[type="submit"]', $form).each(function()
        {
            $btn = $(this);
            $btn.prop('type','button' );
            $btn.prop('orig_label',$btn.text());
            $btn.text('Sending ...');
        });


                    $.ajax({
                type: "POST",
                url: 'handler.php',
                data: $form.serialize(),
                success: after_form_submitted,
                dataType: 'json'
            });

      });
});
</script>
<div class="form-container">
  <h1>Contact Us</h1>

  <form  method="post" id="reused_form" >
      <label for="name">Your Name:</label>
      <input id="name" type="text" name="Name" required maxlength="50">

      <label for="email">Email Address:</label>
      <input id="email" type="email" name="Email" required maxlength="50">

      <label for="message">Message:</label>
      <textarea id="message" name="Message" rows="10" maxlength="6000" required></textarea>




      <button class="button-primary" type="submit" >Post</button>
  </form>
  <div  id="success_message" style="display:none">
      <h3>Submitted the form successfully!</h3>
      <p>
      We will get back to you soon.
      </p>
  </div>
  <div id="error_message"
        style="width:100%; height:100%; display:none; ">
            <h3>Error</h3>
            Sorry there was an error sending your form.

  </div>
</div>

This code notify me about the submission but do not notify the visitor in there mail that there submission is successful.

The visitor should get mail from [email protected] that your submission is successfully in there mail.

In Google Apps Script, How to prevent multiple submission of form data by reloading the HTML returned by doPost()?

I created a web form using Google Apps Script, where form visitors would see result.html after data submission. However, the data may be submitted multiple times if visitors reload the result.html by pressing F5, Ctrl + R, ignoring the alert of resubmission. The same concern has already been posted here, and I tried implementing one of the solutions for that, but in vain.

I have now four files in the same project of Google Apps Script:

  1. index.html that produces the form
  2. JavaScript.html that defines functions used in index.html
  3. result.html that is presented after the form submission
  4. code.gs that shows the form by doGet(), and processes the submitted data and presents result.html by doPost(). include() defined in this file enables to input JavaScript.html into index.html

The solution I have tried is adding the following JavaScript code result.html. I also add that to JavaScript.html so that the code is to be executed in index.html, too.

<script>
    if ( window.history.replaceState ) {
        window.history.replaceState( null, null, window.location.href );
    }
</script>

However, the resubmission still occurs when I reload the result.html even after I added that code to both result.html and index.html. What am I missing?

index.html

<!DOCTYPE html>
<html>
  <head>
    <base target="_top">
    <!-- <?!= include("css"); ?> -->
  </head>

  <body onload="addOptions()">   <!--Execute addOptions function immediately after a page has been loaded-->
    <form class="" action="<?!= getScriptUrl(); ?>" method="post" onSubmit="document.getElementById('submit').disabled=true;">
      <div>
        <h1 id="Question">
          Choose either cheesecake or chocolate cake.
        </h1>
          <select id="dropdownList" name="cake" class="form-control"> 
          </select>
      </div>

      <div class="form-submit">
        <input type="submit" name="" value="Submit">
      </div>
    </form>
  </body>
  <?!= include('JavaScript') ?>
</html>

JavaScript.html

<script>
  function addOptions() {
    /*This will call server-side Apps Script function getAvailableExps and if it is successful, 
    it will pass the return value to function addListValues which will add options to the drop down menu*/
    google.script.run
      .withFailureHandler(onFailure)
      .withSuccessHandler(addListValues)
      .getAvailableExps();
  }

  function addListValues(values) { 
    //Add options to drop down menu using the values of parameter 'values'.     
    for (var i = 0; i < values.length; i++) {
      var option = document.createElement("option");
      option.text = values[i][0];
      option.value = values[i][0];
      var select = document.getElementById("dropdownList");
      select.appendChild(option);
    }
  }

  function onFailure(err) {
    alert('Error: ' + err.message);
  }

  if ( window.history.replaceState ) {
        window.history.replaceState( null, null, window.location.href );
  }
</script>

result.html

<!DOCTYPE html>
<html lang="ja">
  <head>
    <meta charset="UTF-8">
    <base />
    <title>Thank you for your order!</title>
    <!-- <?!= include('css'); ?> -->
  </head>
  <script>
    if ( window.history.replaceState ) {
      window.history.replaceState( null, null, window.location.href );
    }
  </script>
  <body>
    <p>
      Don't forget what you've ordered!
    </p>
  </body>
</html>

code.gs

var sheetID = "............................................";
var inventory_sheet = "Inventory";

function doGet(){
  return HtmlService.createTemplateFromFile("index").evaluate();
}

function include(filename){
  return HtmlService.createHtmlOutputFromFile(filename).getContent();
}

function getScriptUrl() {
  var url = ScriptApp.getService().getUrl();
  Logger.log(url);
  return url;
}

function doPost(e){
  var ss = SpreadsheetApp.openById(sheetID);
  var sh = ss.getSheets()[0];
  sh.appendRow([String(e.parameters.cake)]);

  //update Inventory
  var inventory = ss.getSheetByName(inventory_sheet);
  var row = inventory.createTextFinder(e.parameters.cake).findNext().getRow();
  var range = inventory.getRange(row, 2);
  var data = range.getValue();
  range.setValue(parseInt(data - 1))

  return HtmlService.createTemplateFromFile("result").evaluate(); 
  
}

function getAvailableExps(){
  var inventory = SpreadsheetApp.openById(sheetID).getSheetByName(inventory_sheet);
  var data =  inventory.getRange(2, 1, 2, 2).getValues();
  var filtered = data.filter(arr =>  arr[1] > 0 || arr[1] != ''); //remove exp to array if quantity is 0 or empty
  return filtered;
}

How could I duplicate/copy file in an automatized way with JavaScript?

I have an gif file that is stored in a directory call assets on my computer. I would like to create X amount of duplicates and they should be stored in the same directory and each of them should have a different file name.

Example:

I in the assets directory is the gif file call 0.gif I would like to duplicate this gif file 10 times and The duplicates should be called 1.gif, 2.gif, 3.R and so on.

How to test a callback functionality in a nested code

For explicitness to knowing how to write tests for my existing code, I am keeping not-so-good code. How to test this…

const saveProducts = () => {
 arr = [
    {
        name: "Mini Tiffin",
        category: "Kitchen",
        description:
            "kadai",
        price: 399,
    },
    {
        name: "Big Boy Burger",
        category: "American",
        description: "Double patty burger with cheese and fries",
        price: 500,
    },
];

    arr.forEach(function (item, req, res) {
        productImg = saveProductImg();

        return Product.findOne({ name: item.name }, (err, data) => {
            if (!data) {
                try {
                    const newProd = new Product({
                        name: item.name,
                        description: item.description,
                        price: item.price,
                        category: item.category,
                        productImg: productImg,
                    });
                    newProd.save();
                } catch (err) {
                    console.log(err);
                }
            }
        });
    });
};

Error: Can’t walk dependency graph with web3 browserify

I am trying to browserify a node project with require() in the main.js file. It’s working for the other modules but if I add

const Web3 = require('web3')

It’s giving me this error:

Error: Can’t walk dependency graph: Cannot find module
‘builtin-status-codes’ from
‘/usr/local/lib/node_modules/browserify/node_modules/stream-http/index.js’
required by /usr/local/lib/node_modules/browserify/node_modules/stream-http/index.js
at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:146:35
at processDirs (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:299:39)
at isdir (/usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:306:32)
at /usr/local/lib/node_modules/browserify/node_modules/resolve/lib/async.js:34:69
at FSReqCallback.oncomplete (node:fs:198:21)

I have it installed though so I’m not sure why I’m getting this error.

Common Header and Footer in Next.js

I am new to Next.js and don’t know what is the correct approach. I want to keep my Header and Footer fix at the top and bottom respectively.

My folder structure look like this –
folder structure screenshot

Layout.js

import Nav from "./Nav";
import Footer from "./Footer";

const Layout = ({ children }) => {
  return (
    <>
      {/* <Nav /> */}
      <div className="container">
        <div className="row">
          <div className="col">
            <h1>i am layout</h1>
            {children}
          </div>
        </div>
      </div>
      {/* <Footer /> */}
    </>
  );
};

export default Layout;

Index.js

import Head from "next/head";
import styles from "../styles/Home.module.css";

export default function Home() {
  return (
    <div className={styles.dvHeader}>
      <Head>
        <title>Home</title>
        <meta name="description" content="This is about page" />
        <meta name="keywords" content="html, css, javascript" />
        <link rel="icon" href="/favicon.ico" />
      </Head>
      <h1>i am index.js</h1>
    </div>
  );
}

_app.js

import Layout from "../components/Layout";
import "../styles/globals.css";

function MyApp({ Component, pageProps }) {
  return (
    <>
      <Layout>
        <Component {...pageProps} />
      </Layout>
    </>
  );
}

export default MyApp;

Change data on UI without refresh

how do I change some data on UI without refreshing the screen in a web app using node js?
I need to change only a few things on the screen. And one more doubt is how the data update on screen whenever the data on the database changes.

group Barchart gives an errror in d3

This is my expected result
Please Click to see Image

This is the data I am using: –

year,co2,ghg
2000,15.34,34.86
2001,15.54,34.86
2002,16.53,34.06
2003,17.03,29.74
2004,17.48,31.97
2005,16.98,29.66
2006,17.62,31.52
2007,19.82,30.91
2008,17.24,29.93
2009,17.66,29.14
2010,17.31,27.13
2011,17.43,28.61
2012,17.91,28.08
2013,16.67,23.88
2014,16.8,24
2015,16.6,23.67
2016,16.04,23.8
2017,15.78,25.34
2018,15.2,24.87

When I use it in HTML like this It works completely fine

<!DOCTYPE html>
<html lang="en">

<head>
  <link rel="stylesheet" href="main.css">
  <title>Stacked Bar Graph</title>
  <meta charset="utf-8">
<script src="https://d3js.org/d3.v4.js"></script>
</head>

<body>
  <script>
var margin = {top: 10, right: 30, bottom: 20, left: 50},
    width = 1000 - margin.left - margin.right,
    height = 400 - margin.top - margin.bottom;

// append the svg object to the body of the page
var svg = d3.select("body")
  .append("svg")
    .attr("width", width + margin.left + margin.right)
    .attr("height", height + margin.top + margin.bottom)
  .append("g")
    .attr("transform",
          "translate(" + margin.left + "," + margin.top + ")");

d3.csv("data.csv", function(data) {

  var subgroups = data.columns.slice(1);

  var groups = d3.map(data, function(d){return(d.year)}).keys()

  var x = d3.scaleBand()
      .domain(groups)
      .range([0, width])
      .padding([0.2])
  svg.append("g")
    .attr("transform", "translate(0," + height + ")")
    .call(d3.axisBottom(x).tickSize(5));

  var y = d3.scaleLinear()
    .domain([0, 40])
    .range([ height, 0 ]);
  svg.append("g")
    .call(d3.axisLeft(y).ticks(8));

  var xSubgroup = d3.scaleBand()
    .domain(subgroups)
    .range([0, x.bandwidth()])
    .padding([0.05])

  var color = d3.scaleOrdinal()
    .domain(subgroups)
    .range(['#e41a1c','#377eb8','#4daf4a'])

  svg.append("g")
    .selectAll("g")

    .data(data)
    .enter()
    .append("g")
      .attr("transform", function(d) { return "translate(" + x(d.year) + ",0)"; })
    .selectAll("rect")
    .data(function(d) { return subgroups.map(function(key) { return {key: key, value: d[key]}; }); })
    .enter().append("rect")
      .attr("x", function(d) { return xSubgroup(d.key); })
      .attr("y", function(d) { return y(d.value); })
      .attr("width", xSubgroup.bandwidth())
      .attr("height", function(d) { return height - y(d.value); })
      .attr("fill", function(d) { return color(d.key); });

})
  </script>

</body>

</html>

But when I use it in a separate Js file like this

function GroupBar() {
  // set the dimensions and margins of the graph
var margin = {top: 10, right: 30, bottom: 20, left: 50},
    width = 1000 - margin.left - margin.right,
    height = 400 - margin.top - margin.bottom;

// append the svg object to the body of the page
var svg = d3.select("body")
  .append("svg")
    .attr("width", width + margin.left + margin.right)
    .attr("height", height + margin.top + margin.bottom)
  .append("g")
    .attr("transform",
          "translate(" + margin.left + "," + margin.top + ")");

// Parse the Data
d3.csv("src/data/co2_vs_ghg.csv", function(data) {

  // List of subgroups = header of the csv files = soil condition here
  var subgroups = data.columns.slice(1);

  // List of groups = species here = value of the first column called group -> I show them on the X axis
  var groups = d3.map(data, function(d){return(d.year)}).keys()

  // Add X axis
  var x = d3.scaleBand()
      .domain(groups)
      .range([0, width])
      .padding([0.2])
  svg.append("g")
    .attr("transform", "translate(0," + height + ")")
    .call(d3.axisBottom(x).tickSize(5));

  // Add Y axis
  var y = d3.scaleLinear()
    .domain([0, 40])
    .range([ height, 0 ]);
  svg.append("g")
    .call(d3.axisLeft(y).ticks(8));

  // Another scale for subgroup position?
  var xSubgroup = d3.scaleBand()
    .domain(subgroups)
    .range([0, x.bandwidth()])
    .padding([0.05])

  // color palette = one color per subgroup
  var color = d3.scaleOrdinal()
    .domain(subgroups)
    .range(['#e41a1c','#377eb8','#4daf4a'])

  // Show the bars
  svg.append("g")
    .selectAll("g")
    // Enter in data = loop group per group
    .data(data)
    .enter()
    .append("g")
      .attr("transform", function(d) { return "translate(" + x(d.year) + ",0)"; })
    .selectAll("rect")
    .data(function(d) { return subgroups.map(function(key) { return {key: key, value: d[key]}; }); })
    .enter().append("rect")
      .attr("x", function(d) { return xSubgroup(d.key); })
      .attr("y", function(d) { return y(d.value); })
      .attr("width", xSubgroup.bandwidth())
      .attr("height", function(d) { return height - y(d.value); })
      .attr("fill", function(d) { return color(d.key); });

});
}

window.addEventListener("load", GroupBar);

It gives me an error
shown here

I have tried some alternate methods online but none of them work I think I am missing a minute detail but cannot figure out what if anyone can double check this it would be great

How can I make an array of 140*140 pixels into an array of 28*28?

I am writing a website that allows a user to hand-draw a number and then predict the number drawn using a neural net I made entirely from scratch in C++ (no external libraries used, trained on MNSIT). Currently, I allow the user to draw in a 140×140 pixel canvas. I want to scale down this 2D array to 28×28 before sending it over for prediction. However, I am having difficulty figuring out the logic that would allow me to convert the array as needed. Any help would be appreciated.

Animate entry of (only new) elements in a virtualized list

I am using react-window FixedSizedList and react-virtualized-auto-sizer Autosizer components to build a list/table UI element that may contain thousands of items that also receives new items via a websocket connection and prepends them to the list. I now have a requirement to animate the entry of new elements in this list.

Here is a codesandbox link with a minimal (and not quite working) example: codesandbox.

Note how the .row animation is triggered for every child of FixedSizedList each time the data list receives a new item. Also note how the .row animation is again triggered for every child of FixedSizedList when the list is scrolled.

I understand that the reason this is happening is because of how list virtualization works using absolute positioning of the children rows. Every time a new item is inserted into data, or the list is scrolled, react-window needs to re-compute the style prop for each row, which recreates every DOM element and hence re-triggers the .row animation.

I would like to animate only the new .row DOM elements when they appear.

Things I have tried:

  • Add animation-iteration-count: 1; to the .row class. This doesn’t work for the same reason mentioned above as every element is re-created on a new item insert.
  • Animate only the first row (example using red background in the code sandbox). While this “works”, it’s not quite suitable. In my production site, updates are not guaranteed to come through one at a time – multiple rows might be inserted at the same time. All new rows should be animated when they are added to the DOM. This can be replicated in the code sandbox by inserting two UUID’s at once in the hook.
  • Not use list virtualization. This of course works fine, but is not suitable. In my production site this list could contain thousands of items.
  • Reading this previous question. The previous question is sparse of information, does not have a minimal example, and has no useful answers or comments. Additionally, it is over 5 years old.

How is it possible to achieve the result I’m looking for here?

Why is Math.random being outperformed by crypto.getRandomValues?

I’ve re-implemented Math.random() using crypto.getRandomValues with a “entropy pool” scheme to reduce the overhead of calls to crypto.getRandomValues. On my computer (x86_64 Windows Chrome) this seems to be about 260% faster than Math.random(). I find this surprising because I was under the impression that Chrome implements the latter using the blazingly fast xorshift128+ PRNG, which should be orders of magnitude faster than whatever CSPRNG is being used under the hood for the former.

class EntropyPool {
    #entropy; #index
    constructor(poolSize = 1024) {
        this.#entropy = new Uint32Array(poolSize)
        this.#index = 0
        crypto.getRandomValues(this.#entropy)
    }
    next() {
        const value = this.#entropy[this.#index++]
        if (this.#index === this.#entropy.length) {
            crypto.getRandomValues(this.#entropy)
            this.#index = 0
        }
        return value
    }
}

const pool = new EntropyPool()

function random() {
    return pool.next() / 4294967296
}

How to store and play the wav audio stream response from API in javascript?

I am trying to use the IBM text to speech API and when I run it in postman/insomnia, the response I get is in wav audio format. It is not in the form of a link, the body of the response plays the audio right away in postman. I am trying to download this audio for which I don’t have a URL.

When I try to get a response using the code on the bottom, it does not give me the audio file in the terminal(or the webpage) but instead prints this huge response:

  _readableState: ReadableState {
    objectMode: false,
    highWaterMark: 16384,
    buffer: BufferList { head: null, tail: null, length: 0 },
    length: 0,
    pipes: [],
    flowing: null,
    ended: false,
    endEmitted: false,
    reading: false,
    constructed: true,
    sync: true,
    needReadable: false,
    emittedReadable: false,
    readableListening: false,
    resumeScheduled: false,
    errorEmitted: false,
    emitClose: true,
    autoDestroy: false,
    destroyed: false,
    errored: null,
    closed: false,
    closeEmitted: false,
    defaultEncoding: 'utf8',
    awaitDrainWriters: null,
    multiAwaitDrain: false,
    readingMore: true,
    decoder: null,
    encoding: null,
    [Symbol(kPaused)]: null
  },
  _events: [Object: null prototype] { end: [Function: responseOnEnd] },
  _eventsCount: 1,
  _maxListeners: undefined,
  socket: <ref *1> TLSSocket {
    _tlsOptions: {
      allowHalfOpen: undefined,
      pipe: false,
      secureContext: [SecureContext],
      isServer: false,
      requestCert: true,
      rejectUnauthorized: true,
      session: undefined,
      ALPNProtocols: undefined,
      requestOCSP: undefined,
      enableTrace: undefined,
      pskCallback: undefined,
      highWaterMark: undefined,
      onread: undefined
    },
    _secureEstablished: true,
    _securePending: false,
    _newSessionPending: false,
    _controlReleased: true,
    secureConnecting: false,
    _SNICallback: null,
    servername: 'api.us-south.text-to-speech.watson.cloud.ibm.com',
    alpnProtocol: false,
    authorized: true,
    authorizationError: null,
    encrypted: true,
    _events: [Object: null prototype] {
      close: [Array],
      end: [Array],
      newListener: [Function: keylogNewListener],
      secure: [Function: onConnectSecure],
      session: [Function (anonymous)],
      free: [Function: onFree],
      timeout: [Array],
      agentRemove: [Function: onRemove],
      error: [Function: socketErrorListener],
      data: [Function: socketOnData],
      drain: [Function: ondrain]
    },
    _eventsCount: 11,
    connecting: false,
    _hadError: false,
    _parent: null,
    _host: 'api.us-south.text-to-speech.watson.cloud.ibm.com',
    _readableState: ReadableState {
      objectMode: false,
      highWaterMark: 16384,
      buffer: BufferList { head: null, tail: null, length: 0 },
      length: 0,
      pipes: [],
      flowing: true,
      ended: false,
      endEmitted: false,
      reading: false,
      constructed: true,
      sync: false,
      needReadable: true,
      emittedReadable: false,
      readableListening: false,
      resumeScheduled: false,
      errorEmitted: false,
      emitClose: false,
      autoDestroy: true,
      destroyed: false,
      errored: null,
      closed: false,
      closeEmitted: false,
      defaultEncoding: 'utf8',
      awaitDrainWriters: null,
      multiAwaitDrain: false,
      readingMore: false,
      decoder: null,
      encoding: null,
      [Symbol(kPaused)]: false
    },
    _maxListeners: undefined,
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: false,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: false,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      constructed: true,
      prefinished: false,
      errorEmitted: false,
      emitClose: false,
      autoDestroy: true,
      errored: null,
      closed: false,
      closeEmitted: false,
      [Symbol(kOnFinished)]: []
    },
    allowHalfOpen: false,
    _sockname: null,
    _pendingData: null,
    _pendingEncoding: '',
    server: undefined,
    _server: null,
    ssl: TLSWrap {
      _parent: [TCP],
      _parentWrap: undefined,
      _secureContext: [SecureContext],
      reading: true,
      onkeylog: [Function: onkeylog],
      onhandshakestart: {},
      onhandshakedone: [Function (anonymous)],
      onocspresponse: [Function: onocspresponse],
      onnewsession: [Function: onnewsessionclient],
      onerror: [Function: onerror],
      [Symbol(owner_symbol)]: [Circular *1]
    },
    _requestCert: true,
    _rejectUnauthorized: true,
    parser: HTTPParser {
      '1': [Function: parserOnHeaders],
      '2': [Function: parserOnHeadersComplete],
      '3': [Function: parserOnBody],
      '4': [Function: parserOnMessageComplete],
      '5': null,
      '6': null,
      _headers: [],
      _url: '',
      socket: [Circular *1],
      incoming: [Circular *2],
      outgoing: [ClientRequest],
      maxHeaderPairs: 2000,
      _consumed: false,
      onIncoming: [Function: parserOnIncomingClient],
      [Symbol(resource_symbol)]: [HTTPClientAsyncResource]
    },
    _httpMessage: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 13,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: [Circular *1],
      _header: 'POST /instances/9412f306-9644-4d51-892e-03e0fda54754/v1/synthesize?voice=en-US_AllisonV3Voice HTTP/1.1rn' +
        'Content-Type: application/jsonrn' +
        'Accept: audio/wavrn' +
        'Authorization: Basic YXBpa2V5Omh1dnhYNVBfX1VmbVhaSV9VNEZtVGRySklpWU5jQ0FGaFVvN195eEJwSEFIrn' +
        'Host: api.us-south.text-to-speech.watson.cloud.ibm.comrn' +
        'Connection: closern' +
        'Content-Length: 13rn' +
        'rn',
      _keepAliveTimeout: 0,
      _onPendingData: {},
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/instances/9412f306-9644-4d51-892e-03e0fda54754/v1/synthesize?voice=en-US_AllisonV3Voice',
      _ended: false,
      res: [Circular *2],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: [HTTPParser],
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'api.us-south.text-to-speech.watson.cloud.ibm.com',
      protocol: 'https:',
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    [Symbol(res)]: TLSWrap {
      _parent: [TCP],
      _parentWrap: undefined,
      _secureContext: [SecureContext],
      reading: true,
      onkeylog: [Function: onkeylog],
      onhandshakestart: {},
      onhandshakedone: [Function (anonymous)],
      onocspresponse: [Function: onocspresponse],
      onnewsession: [Function: onnewsessionclient],
      onerror: [Function: onerror],
      [Symbol(owner_symbol)]: [Circular *1]
    },
    [Symbol(verified)]: true,
    [Symbol(pendingSession)]: null,
    [Symbol(async_id_symbol)]: 79,
    [Symbol(kHandle)]: TLSWrap {
      _parent: [TCP],
      _parentWrap: undefined,
      _secureContext: [SecureContext],
      reading: true,
      onkeylog: [Function: onkeylog],
      onhandshakestart: {},
      onhandshakedone: [Function (anonymous)],
      onocspresponse: [Function: onocspresponse],
      onnewsession: [Function: onnewsessionclient],
      onerror: [Function: onerror],
      [Symbol(owner_symbol)]: [Circular *1]
    },
    [Symbol(kSetNoDelay)]: false,
    [Symbol(lastWriteQueueSize)]: 0,
    [Symbol(timeout)]: null,
    [Symbol(kBuffer)]: null,
    [Symbol(kBufferCb)]: null,
    [Symbol(kBufferGen)]: null,
    [Symbol(kCapture)]: false,
    [Symbol(kBytesRead)]: 0,
    [Symbol(kBytesWritten)]: 0,
    [Symbol(connect-options)]: {
      rejectUnauthorized: true,
      ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA',
      checkServerIdentity: [Function: checkServerIdentity],
      minDHSize: 1024,
      protocol: 'https:',
      hostname: 'api.us-south.text-to-speech.watson.cloud.ibm.com',
      hash: '',
      search: '?voice=en-US_AllisonV3Voice',
      pathname: '/instances/9412f306-9644-4d51-892e-03e0fda54754/v1/synthesize',
      path: null,
      href: 'https://api.us-south.text-to-speech.watson.cloud.ibm.com/instances/9412f306-9644-4d51-892e-03e0fda54754/v1/synthesize?voice=en-US_AllisonV3Voice',
      method: 'POST',
      headers: [Object],
      _defaultAgent: [Agent],
      port: 443,
      host: 'api.us-south.text-to-speech.watson.cloud.ibm.com',
      servername: 'api.us-south.text-to-speech.watson.cloud.ibm.com',
      _agentKey: 'api.us-south.text-to-speech.watson.cloud.ibm.com:443:::::::::::::::::::::',
      encoding: null,
      singleUse: true
    },
    [Symbol(RequestTimeout)]: undefined
  },
  httpVersionMajor: 1,
  httpVersionMinor: 1,
  httpVersion: '1.1',
  complete: false,
  rawHeaders: [
    'Server',
    'watson-gateway',
    'session-name',
    'VFZGTJRIIHOHXASR-en-US_AllisonV3Voice',
    'Content-Type',
    'audio/wav',
    'content-disposition',
    'inline; filename="result.wav"',
    'x-xss-protection',
    '1',
    'x-content-type-options',
    'nosniff',
    'x-frame-options',
    'DENY',
    'Content-Security-Policy',
    "default-src 'self'",
    'strict-transport-security',
    'max-age=31536000; includeSubDomains;',
    'x-dp-watson-tran-id',
    '3f2f8c4a-a4c2-4f3d-b02f-08495e5fb158',
    'x-request-id',
    '3f2f8c4a-a4c2-4f3d-b02f-08495e5fb158',
    'x-global-transaction-id',
    '3f2f8c4a-a4c2-4f3d-b02f-08495e5fb158',
    'X-EdgeConnect-MidMile-RTT',
    '20',
    'X-EdgeConnect-Origin-MEX-Latency',
    '976',
    'Date',
    'Sun, 22 May 2022 02:21:25 GMT',
    'Transfer-Encoding',
    'chunked',
    'Connection',
    'close',
    'Connection',
    'Transfer-Encoding'
  ],
  rawTrailers: [],
  aborted: false,
  upgrade: false,
  url: '',
  method: null,
  statusCode: 200,
  statusMessage: 'OK',
  client: <ref *1> TLSSocket {
    _tlsOptions: {
      allowHalfOpen: undefined,
      pipe: false,
      secureContext: [SecureContext],
      isServer: false,
      requestCert: true,
      rejectUnauthorized: true,
      session: undefined,
      ALPNProtocols: undefined,
      requestOCSP: undefined,
      enableTrace: undefined,
      pskCallback: undefined,
      highWaterMark: undefined,
      onread: undefined
    },
    _secureEstablished: true,
    _securePending: false,
    _newSessionPending: false,
    _controlReleased: true,
    secureConnecting: false,
    _SNICallback: null,
    servername: 'api.us-south.text-to-speech.watson.cloud.ibm.com',
    alpnProtocol: false,
    authorized: true,
    authorizationError: null,
    encrypted: true,
    _events: [Object: null prototype] {
      close: [Array],
      end: [Array],
      newListener: [Function: keylogNewListener],
      secure: [Function: onConnectSecure],
      session: [Function (anonymous)],
      free: [Function: onFree],
      timeout: [Array],
      agentRemove: [Function: onRemove],
      error: [Function: socketErrorListener],
      data: [Function: socketOnData],
      drain: [Function: ondrain]
    },
    _eventsCount: 11,
    connecting: false,
    _hadError: false,
    _parent: null,
    _host: 'api.us-south.text-to-speech.watson.cloud.ibm.com',
    _readableState: ReadableState {
      objectMode: false,
      highWaterMark: 16384,
      buffer: BufferList { head: null, tail: null, length: 0 },
      length: 0,
      pipes: [],
      flowing: true,
      ended: false,
      endEmitted: false,
      reading: false,
      constructed: true,
      sync: false,
      needReadable: true,
      emittedReadable: false,
      readableListening: false,
      resumeScheduled: false,
      errorEmitted: false,
      emitClose: false,
      autoDestroy: true,
      destroyed: false,
      errored: null,
      closed: false,
      closeEmitted: false,
      defaultEncoding: 'utf8',
      awaitDrainWriters: null,
      multiAwaitDrain: false,
      readingMore: false,
      decoder: null,
      encoding: null,
      [Symbol(kPaused)]: false
    },
    _maxListeners: undefined,
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: false,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: false,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      constructed: true,
      prefinished: false,
      errorEmitted: false,
      emitClose: false,
      autoDestroy: true,
      errored: null,
      closed: false,
      closeEmitted: false,
      [Symbol(kOnFinished)]: []
    },
    allowHalfOpen: false,
    _sockname: null,
    _pendingData: null,
    _pendingEncoding: '',
    server: undefined,
    _server: null,
    ssl: TLSWrap {
      _parent: [TCP],
      _parentWrap: undefined,
      _secureContext: [SecureContext],
      reading: true,
      onkeylog: [Function: onkeylog],
      onhandshakestart: {},
      onhandshakedone: [Function (anonymous)],
      onocspresponse: [Function: onocspresponse],
      onnewsession: [Function: onnewsessionclient],
      onerror: [Function: onerror],
      [Symbol(owner_symbol)]: [Circular *1]
    },
    _requestCert: true,
    _rejectUnauthorized: true,
    parser: HTTPParser {
      '1': [Function: parserOnHeaders],
      '2': [Function: parserOnHeadersComplete],
      '3': [Function: parserOnBody],
      '4': [Function: parserOnMessageComplete],
      '5': null,
      '6': null,
      _headers: [],
      _url: '',
      socket: [Circular *1],
      incoming: [Circular *2],
      outgoing: [ClientRequest],
      maxHeaderPairs: 2000,
      _consumed: false,
      onIncoming: [Function: parserOnIncomingClient],
      [Symbol(resource_symbol)]: [HTTPClientAsyncResource]
    },
    _httpMessage: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 13,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: [Circular *1],
      _header: 'POST /instances/9412f306-9644-4d51-892e-03e0fda54754/v1/synthesize?voice=en-US_AllisonV3Voice HTTP/1.1rn' +
        'Content-Type: application/jsonrn' +
        'Accept: audio/wavrn' +
        'Authorization: Basic YXBpa2V5Omh1dnhYNVBfX1VmbVhaSV9VNEZtVGRySklpWU5jQ0FGaFVvN195eEJwSEFIrn' +
        'Host: api.us-south.text-to-speech.watson.cloud.ibm.comrn' +
        'Connection: closern' +
        'Content-Length: 13rn' +
        'rn',
      _keepAliveTimeout: 0,
      _onPendingData: {},
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/instances/9412f306-9644-4d51-892e-03e0fda54754/v1/synthesize?voice=en-US_AllisonV3Voice',
      _ended: false,
      res: [Circular *2],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: [HTTPParser],
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'api.us-south.text-to-speech.watson.cloud.ibm.com',
      protocol: 'https:',
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    [Symbol(res)]: TLSWrap {
      _parent: [TCP],
      _parentWrap: undefined,
      _secureContext: [SecureContext],
      reading: true,
      onkeylog: [Function: onkeylog],
      onhandshakestart: {},
      onhandshakedone: [Function (anonymous)],
      onocspresponse: [Function: onocspresponse],
      onnewsession: [Function: onnewsessionclient],
      onerror: [Function: onerror],
      [Symbol(owner_symbol)]: [Circular *1]
    },
    [Symbol(verified)]: true,
    [Symbol(pendingSession)]: null,
    [Symbol(async_id_symbol)]: 79,
    [Symbol(kHandle)]: TLSWrap {
      _parent: [TCP],
      _parentWrap: undefined,
      _secureContext: [SecureContext],
      reading: true,
      onkeylog: [Function: onkeylog],
      onhandshakestart: {},
      onhandshakedone: [Function (anonymous)],
      onocspresponse: [Function: onocspresponse],
      onnewsession: [Function: onnewsessionclient],
      onerror: [Function: onerror],
      [Symbol(owner_symbol)]: [Circular *1]
    },
    [Symbol(kSetNoDelay)]: false,
    [Symbol(lastWriteQueueSize)]: 0,
    [Symbol(timeout)]: null,
    [Symbol(kBuffer)]: null,
    [Symbol(kBufferCb)]: null,
    [Symbol(kBufferGen)]: null,
    [Symbol(kCapture)]: false,
    [Symbol(kBytesRead)]: 0,
    [Symbol(kBytesWritten)]: 0,
    [Symbol(connect-options)]: {
      rejectUnauthorized: true,
      ciphers: 'TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA256:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!SRP:!CAMELLIA',
      checkServerIdentity: [Function: checkServerIdentity],
      minDHSize: 1024,
      protocol: 'https:',
      hostname: 'api.us-south.text-to-speech.watson.cloud.ibm.com',
      hash: '',
      search: '?voice=en-US_AllisonV3Voice',
      pathname: '/instances/9412f306-9644-4d51-892e-03e0fda54754/v1/synthesize',
      path: null,
      href: 'https://api.us-south.text-to-speech.watson.cloud.ibm.com/instances/9412f306-9644-4d51-892e-03e0fda54754/v1/synthesize?voice=en-US_AllisonV3Voice',
      method: 'POST',
      headers: [Object],
      _defaultAgent: [Agent],
      port: 443,
      host: 'api.us-south.text-to-speech.watson.cloud.ibm.com',
      servername: 'api.us-south.text-to-speech.watson.cloud.ibm.com',
      _agentKey: 'api.us-south.text-to-speech.watson.cloud.ibm.com:443:::::::::::::::::::::',
      encoding: null,
      singleUse: true
    },
    [Symbol(RequestTimeout)]: undefined
  },
  _consuming: false,
  _dumped: false,
  req: <ref *3> ClientRequest {
    _events: [Object: null prototype] {
      error: [Function],
      prefinish: [Function: requestOnPrefinish]
    },
    _eventsCount: 2,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    destroyed: false,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: true,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: 13,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    _closed: false,
    socket: <ref *1> TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: false,
      _SNICallback: null,
      servername: 'api.us-south.text-to-speech.watson.cloud.ibm.com',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 11,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'api.us-south.text-to-speech.watson.cloud.ibm.com',
      _readableState: [ReadableState],
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: [TLSWrap],
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: [HTTPParser],
      _httpMessage: [Circular *3],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(async_id_symbol)]: 79,
      [Symbol(kHandle)]: [TLSWrap],
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(connect-options)]: [Object],
      [Symbol(RequestTimeout)]: undefined
    },
    _header: 'POST /instances/9412f306-9644-4d51-892e-03e0fda54754/v1/synthesize?voice=en-US_AllisonV3Voice HTTP/1.1rn' +
      'Content-Type: application/jsonrn' +
      'Accept: audio/wavrn' +
      'Authorization: Basic YXBpa2V5Omh1dnhYNVBfX1VmbVhaSV9VNEZtVGRySklpWU5jQ0FGaFVvN195eEJwSEFIrn' +
      'Host: api.us-south.text-to-speech.watson.cloud.ibm.comrn' +
      'Connection: closern' +
      'Content-Length: 13rn' +
      'rn',
    _keepAliveTimeout: 0,
    _onPendingData: {},
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 443,
      protocol: 'https:',
      options: [Object],
      requests: {},
      sockets: [Object],
      freeSockets: {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'lifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 1,
      maxCachedSessions: 100,
      _sessionCache: [Object],
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'POST',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    path: '/instances/9412f306-9644-4d51-892e-03e0fda54754/v1/synthesize?voice=en-US_AllisonV3Voice',
    _ended: false,
    res: [Circular *2],
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: HTTPParser {
      '1': [Function: parserOnHeaders],
      '2': [Function: parserOnHeadersComplete],
      '3': [Function: parserOnBody],
      '4': [Function: parserOnMessageComplete],
      '5': null,
      '6': null,
      _headers: [],
      _url: '',
      socket: [TLSSocket],
      incoming: [Circular *2],
      outgoing: [Circular *3],
      maxHeaderPairs: 2000,
      _consumed: false,
      onIncoming: [Function: parserOnIncomingClient],
      [Symbol(resource_symbol)]: [HTTPClientAsyncResource]
    },
    maxHeadersCount: null,
    reusedSocket: false,
    host: 'api.us-south.text-to-speech.watson.cloud.ibm.com',
    protocol: 'https:',
    [Symbol(kCapture)]: false,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      'content-type': [Array],
      accept: [Array],
      authorization: [Array],
      host: [Array]
    }
  },
  [Symbol(kCapture)]: false,
  [Symbol(kHeaders)]: null,
  [Symbol(kHeadersCount)]: 36,
  [Symbol(kTrailers)]: null,
  [Symbol(kTrailersCount)]: 0,
  [Symbol(RequestTimeout)]: undefined
}

I know this is because I’m trying to print the wav audio in the console, where I’m making the error. Any help in that would be highly appreciated. Thank you!

    const options = {
        method:"POST",
        headers:{
            "Content-Type":'application/json',
            "Accept":'audio/wav',
            "Authorization": `Basic {my apikey}`
        }
    };

    const post_data = JSON.stringify({"text": 'he'});       //body
    const token_endpoint = "https://{ibm url}/v1/synthesize?voice=en-US_AllisonV3Voice";
    const token_request = https.request(token_endpoint, options);
    token_request.once("error", err => {throw err});

    token_request.once("response", response => console.log(response) );

    token_request.end(post_data); //( , ()=> token_endpoint.end())