Skip to content

Can't recognize data in MULAW format feeded via RTP (during SIP call) #279

@bloodcarter

Description

@bloodcarter

I'm trying to feed the raw data from RTP session into Speech API using createRecognizeStream() like this:

py.stdout.pipe(speechClient.createRecognizeStream({
                                            config: {
                                              encoding: 'MULAW',
                                              sampleRate: 8000,
                                              languageCode: "ru-RU",
                                            },
                                            singleUtterance: false,
                                            interimResults: false
                                          }))
                                          .on('error', console.error)
                                          .on('data', function(data) {
                                            console.log("APIdata:");  
                                            console.log(data);
                                          });

stdout contains raw data from RTP in PCMU/8000 format. As I understood this means it's in MULAW format. But I get results like:

APIdata:
{ error: null,
  results: '',
  resultIndex: 0,
  endpointerType: 'END_OF_SPEECH' }

Maybe PCMU/8000 and your MULAW are not quite the same thing or what? This is not nodejs specific question, rather a general Speech API question.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🚨This issue needs some love.triage meI really want to be triaged.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions