nodejs-speech
nodejs-speech copied to clipboard
got "Internal error encountered." with `adaptationClient.createCustomClass({/*...*/})`
Environment details
- OS: macOS
- Node.js version: v14.18.2
- npm version: 6.14.15
-
@google-cloud/speech
version: 4.9.0
Steps to reproduce
await adaptationClient.createCustomClass({
parent: `projects/${projectId}/locations/global/customClasses`,
customClassId: 'helloworld',
customClass: {
items: [{ value: 'hello' }],
}
})
and i got
Error: 13 INTERNAL: Internal error encountered.
at Object.callErrorFromStatus (/Users/okuni/Projects/raisin-worker/packages/bot/node_modules/@google-cloud/speech/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
at Object.onReceiveStatus (/Users/okuni/Projects/raisin-worker/packages/bot/node_modules/@google-cloud/speech/node_modules/@grpc/grpc-js/build/src/client.js:180:52)
at Object.onReceiveStatus (/Users/okuni/Projects/raisin-worker/packages/bot/node_modules/@google-cloud/speech/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:365:141)
at Object.onReceiveStatus (/Users/okuni/Projects/raisin-worker/packages/bot/node_modules/@google-cloud/speech/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)
at /Users/okuni/Projects/raisin-worker/packages/bot/node_modules/@google-cloud/speech/node_modules/@grpc/grpc-js/build/src/call-stream.js:182:78
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
code: 13,
details: 'Internal error encountered.',
metadata: Metadata { internalRepr: Map(0) {}, options: {} }
}
what is wrong?
I suggest trying out the Model Adaptation test, which invokes this sample code. If you are able to run that successfully, then try to adapt it to your configuration.
@kweinmeister
I tried Model Adaptation test, and got 7 PERMISSION_DENIED: Permission is denied.
But i can create custom classes from browser with GUI. Enough permissions, i guess

parent
option is defined as
-
projects/${projectId}/locations/${location}
in the sample code -
projects/{project}/locations/{location}/customClasses
in the reference document
which is correct ?
Do you get the same error result using both parent
strings with your original code above?