Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Speach API- @google-cloud/speech@0.9.0 failing on specifying the SpeechContext in the speech request config #2231

Closed
nandums opened this issue Apr 18, 2017 · 3 comments
Assignees
Labels
api: speech Issues related to the Speech-to-Text API. type: question Request for information or clarification. Not an issue.

Comments

@nandums
Copy link

nandums commented Apr 18, 2017

Speech API is failing on specifying the SpeechContext in the speech request config, see the below error

Error: .google.cloud.speech.v1.RecognitionConfig#speechContext is not a field: undefined
at Error (native)
at MessagePrototype.set (C:\test-google-asr\node_modules\protobufjs\dist\protobuf.js:2490:35)
at MessagePrototype.set (C:\test-google-asr\node_modules\protobufjs\dist\protobuf.js:2483:38)
at Message (C:\test-google-asr\node_modules\protobufjs\dist\protobuf.js:2411:34)
at Element.ProtoBuf.Reflect.ElementPrototype.verifyValue (C:\test-google-asr\node_modules\protobufjs\dist\protobuf.js:1925:28)
at T.ProtoBuf.Reflect.FieldPrototype.verifyValue (C:\test-google-asr\node_modules\protobufjs\dist\protobuf.js:3499:33)
at MessagePrototype.set (C:\test-google-asr\node_modules\protobufjs\dist\protobuf.js:2493:59)
at MessagePrototype.set (C:\test-google-asr\node_modules\protobufjs\dist\protobuf.js:2483:38)
at Message (C:\test-google-asr\node_modules\protobufjs\dist\protobuf.js:2411:34)
at Element.ProtoBuf.Reflect.ElementPrototype.verifyValue (C:\test-google-asr\node_modules\protobufjs\dist\protobuf.js:1925:28)

Environment details

  • OS: Windows 7
  • Node.js version: v6.7.0
  • npm version: 3.10.3
  • google-cloud/speech: 0.9.0

Steps to reproduce

Run the example code with the below configuration

speechClient.createRecognizeStream({
	config: {
		encoding: 'LINEAR16',
		//sampleRate: 16000,
		sampleRateHertz: 16000,
		maxAlternatives: 2,
		languageCode:"en-US",
		speechContext: {
			phrases: [
				"testing"
			]
		}
	},
	singleUtterance: false,
	interimResults: false
})
@stephenplusplus
Copy link
Contributor

Try speechContexts. Did you find this sample code somewhere?

@stephenplusplus
Copy link
Contributor

See: #2036 (comment)

@stephenplusplus stephenplusplus added the api: speech Issues related to the Speech-to-Text API. label Apr 18, 2017
@stephenplusplus
Copy link
Contributor

Going to close because of the other issue, but let me know if you're still having problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: speech Issues related to the Speech-to-Text API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants