locked
NOSPEECH response RRS feed

  • Question

  • Hi All,

    I´m making some tests but is not working at all.

    I`m sending a wav file to process, but this is the response:

    {"version":"3.0","header":{"status":"error","properties":{"requestid":"4e39a97f-a6f0-4ed0-8fe8-5cfade5038f6","NOSPEECH":"1"}}}

    The file has this format:

    # file /tmp/wavxo5PFPar.wav
    /tmp/wavxo5PFPar.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz

    this is the php code:

    my $ua_request = HTTP::Request->new(POST => "https://speech.platform.bing.com/recognize?locale=en-US&version=3.0&requestid=1d4b6030-9099-11e0-91e4-0800200c9a99&device.os=wp7&format=json&scenarios=catsearch&appid=D4D52672-91D7-4C74-8AD8-42B1D98141A5&instanceid=1d4b6030-9099-11e0-91e4-0800200c9a99");
    $ua_request->header("Authorization" => $atoken);
    $ua_request->content_type("audio/wav; samplerate=8000; sourcerate=8000; trustsourcerate=false");
    $ua_request->content($audio);
    my $ua_response = $ua->request($ua_request);

    Some tips ?

    Monday, August 22, 2016 6:18 PM