How to use js Fetch api get streaming audio chunks and play it?

here’s my code

I want to request the API to return the audio file by streaming, so as to achieve the effect of playing the audio file while requesting, but the returned int8 array cannot be played.

I think the problem is that the audio file is not decoded, but I don’t know how to decode it.

$("#start_stream").click(async function() {


const response = await fetch($("#apiurl").val(), {
      method: "POST",
      body: JSON.stringify(data),
      headers: {
        "Content-Type": "application/json"
      },
    });

    const reader = response.body.getReader();
    
    while (true) {
      const { done, value } = await reader.read();
      if (done) {
        console.log("***********************done");
        $("#start_stream").prop("disabled", false);
        break;
      }
      console.log("--------------------value");
      console.log(value);

      var blob = new Blob([value], { type: 'audio/wav' });
    var url = window.URL.createObjectURL(blob)
    window.audio = new Audio();
    window.audio.src = url;
    window.audio.play();

      


    }




});

but get this error:

Uncaught (in promise) DOMException: Failed to load because no supported source was found.

the value is Uint8Array