Skip to content

SDK Sending an Incomplete WAV header #138

@tonyanziano

Description

@tonyanziano

Hi,

I'm one of the devs working on the Microsoft Bot Framework Emulator desktop application, which hosts another web application -- (Microsoft Bot Framework Web Chat) -- which directly consumes the cognitive-services-speech-sdk.

When testing the speech capabilities of Web Chat on its own, in the browser, I am able to properly communicate with a bot using our DirectLine Speech channel, which leverages cognitive services speech and the SDK.

However, when trying to communicate with the same bot via Web Chat when it is embedded in the Emulator -- an Electron desktop application -- the communication to the bot fails when trying to send speech data to cognitive services speech via the SDK.

I took a look at the web socket traffic in both scenarios, and it turns out that when using the speech SDK in the Electron application, an incomplete WAV header is being sent over the web socket, which results in the cognitive services speech service closing the socket with a reason of InvalidPayloadData.

Web Socket Header in Browser (Working):

 cpath: audio
x-requestid: 86A6DF96B0A04C12B89817FEBF5637E2
x-timestamp: 2020-02-06T00:45:51.403Z
RIFF    WAVEfmt �   � � �>   }  � � data                                                        

image

Web Socket Header in Electron (Broken):

 cpath: audio
x-requestid: BC0A81B4AAA84B48A2F89752139B88FD
x-timestamp: 2020-02-06T00:43:41.421Z
                                                        

image

You can see that in the Electron header, it is missing the RIFF WAVEfmt ... data chunk of the header.

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