diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index c3feaa284d2..4bed520ba0e 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -21,6 +21,7 @@
"packages/google-cloud-gkeconnect-gateway": "2.0.5",
"packages/google-cloud-gkemulticloud": "0.1.4",
"packages/google-cloud-language": "5.1.2",
+ "packages/google-cloud-mediatranslation": "3.0.5",
"packages/google-cloud-memcache": "2.1.4",
"packages/google-cloud-oslogin": "4.0.4",
"packages/google-cloud-phishingprotection": "3.0.6",
diff --git a/packages/google-cloud-mediatranslation/.github/.OwlBot.yaml b/packages/google-cloud-mediatranslation/.OwlBot.yaml
similarity index 78%
rename from packages/google-cloud-mediatranslation/.github/.OwlBot.yaml
rename to packages/google-cloud-mediatranslation/.OwlBot.yaml
index 01169fa832f..bb72d63eda7 100644
--- a/packages/google-cloud-mediatranslation/.github/.OwlBot.yaml
+++ b/packages/google-cloud-mediatranslation/.OwlBot.yaml
@@ -11,13 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-docker:
- image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest
deep-remove-regex:
- /owl-bot-staging
deep-copy-regex:
- - source: /google/cloud/mediatranslation/(.*)/.*-nodejs/(.*)
- dest: /owl-bot-staging/$1/$2
+ - source: /google/cloud/mediatranslation/(.*)/.*-nodejs
+ dest: /owl-bot-staging/google-cloud-mediatranslation/$1
diff --git a/packages/google-cloud-mediatranslation/.mocharc.js b/packages/google-cloud-mediatranslation/.mocharc.js
index 0b600509bed..cdb7b752160 100644
--- a/packages/google-cloud-mediatranslation/.mocharc.js
+++ b/packages/google-cloud-mediatranslation/.mocharc.js
@@ -1,4 +1,4 @@
-// Copyright 2020 Google LLC
+// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/packages/google-cloud-mediatranslation/.prettierrc.js b/packages/google-cloud-mediatranslation/.prettierrc.js
index d1b95106f4c..d546a4ad546 100644
--- a/packages/google-cloud-mediatranslation/.prettierrc.js
+++ b/packages/google-cloud-mediatranslation/.prettierrc.js
@@ -1,4 +1,4 @@
-// Copyright 2020 Google LLC
+// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/packages/google-cloud-mediatranslation/.repo-metadata.json b/packages/google-cloud-mediatranslation/.repo-metadata.json
index 842eac3c808..bd6e90142dc 100644
--- a/packages/google-cloud-mediatranslation/.repo-metadata.json
+++ b/packages/google-cloud-mediatranslation/.repo-metadata.json
@@ -6,7 +6,7 @@
"default_version": "v1beta1",
"language": "nodejs",
"name_pretty": "Cloud Media Translation",
- "repo": "googleapis/nodejs-media-translation",
+ "repo": "googleapis/google-cloud-node",
"product_documentation": "https://cloud.google.com/translate/media/docs/",
"requires_billing": true,
"name": "mediatranslation",
diff --git a/packages/google-cloud-mediatranslation/README.md b/packages/google-cloud-mediatranslation/README.md
index 697dbd9f5f9..3c313d393ce 100644
--- a/packages/google-cloud-mediatranslation/README.md
+++ b/packages/google-cloud-mediatranslation/README.md
@@ -2,7 +2,7 @@
[//]: # "To regenerate it, use `python -m synthtool`."
-# [Cloud Media Translation: Node.js Client](https://github.com/googleapis/nodejs-media-translation)
+# [Cloud Media Translation: Node.js Client](https://github.com/googleapis/google-cloud-node)
[](https://cloud.google.com/terms/launch-stages)
[](https://www.npmjs.org/package/@google-cloud/media-translation)
@@ -14,11 +14,11 @@ Mediatranslation client for Node.js
A comprehensive list of changes in each version may be found in
-[the CHANGELOG](https://github.com/googleapis/nodejs-media-translation/blob/main/CHANGELOG.md).
+[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-mediatranslation/CHANGELOG.md).
* [Cloud Media Translation Node.js Client API Reference][client-docs]
* [Cloud Media Translation Documentation][product-docs]
-* [github.com/googleapis/nodejs-media-translation](https://github.com/googleapis/nodejs-media-translation)
+* [github.com/googleapis/google-cloud-node/packages/google-cloud-mediatranslation](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-mediatranslation)
Read more about the client libraries for Cloud APIs, including the older
Google APIs Client Libraries, in [Client Libraries Explained][explained].
@@ -32,7 +32,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
* [Before you begin](#before-you-begin)
* [Installing the client library](#installing-the-client-library)
-
+* [Samples](#samples)
* [Versioning](#versioning)
* [Contributing](#contributing)
* [License](#license)
@@ -56,6 +56,15 @@ npm install @google-cloud/media-translation
+## Samples
+
+Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample.
+
+| Sample | Source Code | Try it |
+| --------------------------- | --------------------------------- | ------ |
+| Speech_translation_service.streaming_translate_speech | [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/speech_translation_service.streaming_translate_speech.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/speech_translation_service.streaming_translate_speech.js,samples/README.md) |
+
+
The [Cloud Media Translation Node.js Client API Reference][client-docs] documentation
also contains samples.
@@ -103,7 +112,7 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages]
## Contributing
-Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-media-translation/blob/main/CONTRIBUTING.md).
+Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md).
Please note that this `README.md`, the `samples/README.md`,
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
@@ -115,7 +124,7 @@ to its templates in
Apache Version 2.0
-See [LICENSE](https://github.com/googleapis/nodejs-media-translation/blob/main/LICENSE)
+See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
[client-docs]: https://cloud.google.com/nodejs/docs/reference/media-translation/latest
[product-docs]: https://cloud.google.com/translate/media/docs/
diff --git a/packages/google-cloud-mediatranslation/package.json b/packages/google-cloud-mediatranslation/package.json
index c5e16dd1353..9243cdba39f 100644
--- a/packages/google-cloud-mediatranslation/package.json
+++ b/packages/google-cloud-mediatranslation/package.json
@@ -2,7 +2,11 @@
"name": "@google-cloud/media-translation",
"version": "3.0.5",
"description": "Mediatranslation client for Node.js",
- "repository": "googleapis/nodejs-media-translation",
+ "repository": {
+ "type": "git",
+ "directory": "packages/google-cloud-mediatranslation",
+ "url": "https://github.com/googleapis/google-cloud-node.git"
+ },
"license": "Apache-2.0",
"author": "Google LLC",
"files": [
@@ -18,11 +22,12 @@
"docs-test": "linkinator docs",
"predocs-test": "npm run docs",
"prepare": "npm run compile-protos && npm run compile",
- "system-test": "c8 mocha build/system-test",
+ "system-test": "npm run compile && c8 mocha build/system-test",
"test": "c8 mocha build/test",
"fix": "gts fix",
"lint": "gts check",
- "precompile": "gts clean"
+ "precompile": "gts clean",
+ "samples-test": "npm run compile && cd samples/ && npm link ../ && npm i && npm test"
},
"dependencies": {
"google-gax": "^3.5.2"
@@ -48,5 +53,6 @@
},
"engines": {
"node": ">=12.0.0"
- }
+ },
+ "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-mediatranslation"
}
diff --git a/packages/google-cloud-mediatranslation/samples/README.md b/packages/google-cloud-mediatranslation/samples/README.md
new file mode 100644
index 00000000000..9c5037dc020
--- /dev/null
+++ b/packages/google-cloud-mediatranslation/samples/README.md
@@ -0,0 +1,50 @@
+[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
+[//]: # "To regenerate it, use `python -m synthtool`."
+
+
+# [Cloud Media Translation: Node.js Samples](https://github.com/googleapis/google-cloud-node)
+
+[![Open in Cloud Shell][shell_img]][shell_link]
+
+
+
+## Table of Contents
+
+* [Before you begin](#before-you-begin)
+* [Samples](#samples)
+ * [Speech_translation_service.streaming_translate_speech](#speech_translation_service.streaming_translate_speech)
+
+## Before you begin
+
+Before running the samples, make sure you've followed the steps outlined in
+[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library).
+
+`cd samples`
+
+`npm install`
+
+`cd ..`
+
+## Samples
+
+
+
+### Speech_translation_service.streaming_translate_speech
+
+View the [source code](https://github.com/googleapis/google-cloud-node/blob/main//workspace/google-cloud-node/samples/generated/v1beta1/speech_translation_service.streaming_translate_speech.js).
+
+[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=/workspace/google-cloud-node/samples/generated/v1beta1/speech_translation_service.streaming_translate_speech.js,samples/README.md)
+
+__Usage:__
+
+
+`node /workspace/google-cloud-node/samples/generated/v1beta1/speech_translation_service.streaming_translate_speech.js`
+
+
+
+
+
+
+[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
+[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md
+[product-docs]: https://cloud.google.com/translate/media/docs/
diff --git a/packages/google-cloud-mediatranslation/samples/quickstart.js b/packages/google-cloud-mediatranslation/samples/quickstart.js
new file mode 100644
index 00000000000..e24ce10ed28
--- /dev/null
+++ b/packages/google-cloud-mediatranslation/samples/quickstart.js
@@ -0,0 +1,59 @@
+{
+ "clientLibrary": {
+ "name": "nodejs-mediatranslation",
+ "version": "3.0.5",
+ "language": "TYPESCRIPT",
+ "apis": [
+ {
+ "id": "google.cloud.mediatranslation.v1beta1",
+ "version": "v1beta1"
+ }
+ ]
+ },
+ "snippets": [
+ {
+ "regionTag": "mediatranslation_v1beta1_generated_SpeechTranslationService_StreamingTranslateSpeech_async",
+ "title": "SpeechTranslationService streamingTranslateSpeech Sample",
+ "origin": "API_DEFINITION",
+ "description": " Performs bidirectional streaming speech translation: receive results while sending audio. This method is only available via the gRPC API (not REST).",
+ "canonical": true,
+ "file": "speech_translation_service.streaming_translate_speech.js",
+ "language": "JAVASCRIPT",
+ "segments": [
+ {
+ "start": 25,
+ "end": 69,
+ "type": "FULL"
+ }
+ ],
+ "clientMethod": {
+ "shortName": "StreamingTranslateSpeech",
+ "fullName": "google.cloud.mediatranslation.v1beta1.SpeechTranslationService.StreamingTranslateSpeech",
+ "async": true,
+ "parameters": [
+ {
+ "name": "streaming_config",
+ "type": ".google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig"
+ },
+ {
+ "name": "audio_content",
+ "type": "TYPE_BYTES"
+ }
+ ],
+ "resultType": ".google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResponse",
+ "client": {
+ "shortName": "SpeechTranslationServiceClient",
+ "fullName": "google.cloud.mediatranslation.v1beta1.SpeechTranslationServiceClient"
+ },
+ "method": {
+ "shortName": "StreamingTranslateSpeech",
+ "fullName": "google.cloud.mediatranslation.v1beta1.SpeechTranslationService.StreamingTranslateSpeech",
+ "service": {
+ "shortName": "SpeechTranslationService",
+ "fullName": "google.cloud.mediatranslation.v1beta1.SpeechTranslationService"
+ }
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packages/google-cloud-mediatranslation/src/index.ts b/packages/google-cloud-mediatranslation/src/index.ts
index 944ba1007dc..64423e11500 100644
--- a/packages/google-cloud-mediatranslation/src/index.ts
+++ b/packages/google-cloud-mediatranslation/src/index.ts
@@ -1,4 +1,4 @@
-// Copyright 2020 Google LLC
+// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
diff --git a/release-please-config.json b/release-please-config.json
index 065edc12bd5..119dd2359e7 100644
--- a/release-please-config.json
+++ b/release-please-config.json
@@ -22,6 +22,7 @@
"packages/google-cloud-gkeconnect-gateway": {},
"packages/google-cloud-gkemulticloud": {},
"packages/google-cloud-language": {},
+ "packages/google-cloud-mediatranslation": {},
"packages/google-cloud-memcache": {},
"packages/google-cloud-oslogin": {},
"packages/google-cloud-phishingprotection": {},
@@ -48,4 +49,4 @@
}
],
"release-type": "node"
-}
\ No newline at end of file
+}