Throwable = 格式错误 URL。基础:https://speech.googleapis.com/v1/,相对:speech:longrunningrecognize

Throwable = Malformed URL. Base: https://speech.googleapis.com/v1/, Relative: speech:longrunningrecognize

我正在测试 Android 使用 Retrofit2 的请求,我得到了这个 throwable。

URL_BASE = "https://speech.googleapis.com/v1/";

我的要求

@POST("speech:longrunningrecognize")
    Call<String> longRecognize(@Query("key") String key,
                               @Body LongRunningRecognize loginResponse);

点击时

btnInitialSpeech.setOnClickListener(v -> {
            RestClient.INSTANCE.getApiServiceInterface()
                    .longRecognize(GOOGLE_API_KEY, getLongRecognize(f.getName()))
                    .enqueue(new Callback<String>() {
                        @Override
                        public void onResponse(Call<String> call, Response<String> response) {
                            if (response.isSuccessful()) {
                                String body = String.valueOf(response.body());
                                Log.d(TAG, "Response = " + body);
                            }
                        }

                        @Override
                        public void onFailure(Call<String> call, Throwable t) {
                            Log.d(TAG, "Throwable = " + t.getMessage());

                        }
                    });
        });

我创建了项目并像这里一样做所有事情https://cloud.google.com/speech/docs/async-recognize 请告诉我哪里出了问题?

我想通了。

此处speech:longrunningrecognize改为":"需要"/".