@Override public SpeechSettings build() throws IOException { return new SpeechSettings(this); } }
/** Returns the object with the settings used for calls to recognize. */ public UnaryCallSettings<RecognizeRequest, RecognizeResponse> recognizeSettings() { return ((SpeechStubSettings) getStubSettings()).recognizeSettings(); }
/** Constructs an instance of SpeechClient with default settings. */ public static final SpeechClient create() throws IOException { return create(SpeechSettings.newBuilder().build()); }
@Before public void setUp() throws IOException { serviceHelper.reset(); channelProvider = serviceHelper.createChannelProvider(); SpeechSettings settings = SpeechSettings.newBuilder() .setTransportChannelProvider(channelProvider) .setCredentialsProvider(NoCredentialsProvider.create()) .build(); client = SpeechClient.create(settings); }
/** Returns the object with the settings used for calls to streamingRecognize. */ public StreamingCallSettings<StreamingRecognizeRequest, StreamingRecognizeResponse> streamingRecognizeSettings() { return ((SpeechStubSettings) getStubSettings()).streamingRecognizeSettings(); }
/** Returns the object with the settings used for calls to longRunningRecognize. */ public UnaryCallSettings<LongRunningRecognizeRequest, Operation> longRunningRecognizeSettings() { return ((SpeechStubSettings) getStubSettings()).longRunningRecognizeSettings(); }
protected Builder(SpeechSettings settings) { super(settings.getStubSettings().toBuilder()); }
/** Returns the object with the settings used for calls to longRunningRecognize. */ @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public OperationCallSettings< LongRunningRecognizeRequest, LongRunningRecognizeResponse, LongRunningRecognizeMetadata> longRunningRecognizeOperationSettings() { return ((SpeechStubSettings) getStubSettings()).longRunningRecognizeOperationSettings(); }
/** * Constructs an instance of SpeechClient, using the given settings. This is protected so that it * is easy to make a subclass, but otherwise, the static factory methods should be preferred. */ protected SpeechClient(SpeechSettings settings) throws IOException { this.settings = settings; this.stub = ((SpeechStubSettings) settings.getStubSettings()).createStub(); this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); }