diff --git a/google/cloud/speech/README.md b/google/cloud/speech/README.md index acef167471078..55b776f559be0 100644 --- a/google/cloud/speech/README.md +++ b/google/cloud/speech/README.md @@ -36,7 +36,7 @@ void ConfigureRecognizer(google::cloud::speech::v2::RecognizeRequest& request) { int main(int argc, char* argv[]) try { auto constexpr kDefaultUri = "gs://cloud-samples-data/speech/hello.wav"; - if (argc < 3 || argc > 4) { + if (argc != 3 && argc != 4) { std::cerr << "Usage: " << argv[0] << " project |global [gcs-uri]\n" << " Specify the region desired or \"global\"\n" << " The gcs-uri must be in gs://... format. It defaults to " diff --git a/google/cloud/speech/quickstart/quickstart.cc b/google/cloud/speech/quickstart/quickstart.cc index 768af450b58ac..4ef225fb2ad44 100644 --- a/google/cloud/speech/quickstart/quickstart.cc +++ b/google/cloud/speech/quickstart/quickstart.cc @@ -26,7 +26,7 @@ void ConfigureRecognizer(google::cloud::speech::v2::RecognizeRequest& request) { int main(int argc, char* argv[]) try { auto constexpr kDefaultUri = "gs://cloud-samples-data/speech/hello.wav"; - if (argc < 3 || argc > 4) { + if (argc != 3 && argc != 4) { std::cerr << "Usage: " << argv[0] << " project |global [gcs-uri]\n" << " Specify the region desired or \"global\"\n" << " The gcs-uri must be in gs://... format. It defaults to "