Skip to content

Streaming gRPC for google-client java #983

Closed

Description

@gerald732

The samples doesn't work. I got this error. After getting the samples and the dependencies, this is what I get. Not sure what am I missing. Please help?

exception in thread "main" java.lang.IllegalStateException: Missing required properties: totalTimeout initialRetryDelay retryDelayMultiplier maxRetryDelay initialRpcTimeout rpcTimeoutMultiplier maxRpcTimeout
at com.google.api.gax.retrying.AutoValue_RetrySettings$Builder.autoBuild(AutoValue_RetrySettings.java:295)
at com.google.api.gax.retrying.RetrySettings$Builder.build(RetrySettings.java:237)
at com.google.api.gax.rpc.UnaryCallSettings$Builder.(UnaryCallSettings.java:105)
at com.google.api.gax.rpc.UnaryCallSettings.newUnaryCallSettingsBuilder(UnaryCallSettings.java:79)
at com.google.cloud.speech.v1.SpeechSettings$Builder.(SpeechSettings.java:261)
at com.google.cloud.speech.v1.SpeechSettings$Builder.createDefault(SpeechSettings.java:277)
at com.google.cloud.speech.v1.SpeechSettings$Builder.access$000(SpeechSettings.java:207)
at com.google.cloud.speech.v1.SpeechSettings.newBuilder(SpeechSettings.java:183)
at com.google.cloud.speech.v1.SpeechClient.create(SpeechClient.java:117)

Activity

  1. lesv commented on Jan 9, 2018

    @lesv
    Contributor
  2. gerald732 commented on Jan 10, 2018

    @gerald732
    Author

    This is what I did by loading in the service account programmatically. Alternatively, I also tried setting the environment variable to point to the json credential path. It gave the same error as well. Help me out with what I am missing?

    FileInputStream credentialsStream = new FileInputStream("tBuddy-.json");
            GoogleCredentials credentials = GoogleCredentials.fromStream(credentialsStream);
            FixedCredentialsProvider credentialsProvider = FixedCredentialsProvider.create(credentials);
            
            SpeechSettings speechSettings
                    = SpeechSettings.newBuilder()
                            .setCredentialsProvider(credentialsProvider)
                            .build();
    
            SpeechClient speech = SpeechClient.create(speechSettings);
    
  3. dzlier-gcp commented on Jan 19, 2018

    @dzlier-gcp
    Member

    Working on this today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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