Skip to content

Commit

Permalink
samples: move generated samples to generated directory (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
chingor13 authored Feb 24, 2020
1 parent b7d2aab commit f026bfc
Show file tree
Hide file tree
Showing 49 changed files with 72 additions and 223 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
// sample-metadata:
// title: Transcribe Audio File using Long Running Operation (Local File) (LRO)
// description: Transcribe a long audio file using asynchronous speech recognition
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeAsync
// [--args='[--local_file_path "resources/brooklyn_bridge.raw"]']
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeAsync [--args='[--local_file_path "resources/brooklyn_bridge.raw"]']

package com.google.cloud.examples.speech.v1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// DO NOT EDIT! This is a generated sample ("LongRunningRequestAsync",
// "speech_transcribe_async_gcs")
// DO NOT EDIT! This is a generated sample ("LongRunningRequestAsync", "speech_transcribe_async_gcs")
// sample-metadata:
// title: Transcript Audio File using Long Running Operation (Cloud Storage) (LRO)
// description: Transcribe long audio file from Cloud Storage using asynchronous speech
// recognition
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeAsyncGcs
// [--args='[--storage_uri "gs://cloud-samples-data/speech/brooklyn_bridge.raw"]']
// description: Transcribe long audio file from Cloud Storage using asynchronous speech recognition
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeAsyncGcs [--args='[--storage_uri "gs://cloud-samples-data/speech/brooklyn_bridge.raw"]']

package com.google.cloud.examples.speech.v1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// DO NOT EDIT! This is a generated sample ("LongRunningRequestAsync",
// "speech_transcribe_async_word_time_offsets_gcs")
// DO NOT EDIT! This is a generated sample ("LongRunningRequestAsync", "speech_transcribe_async_word_time_offsets_gcs")
// sample-metadata:
// title: Getting word timestamps (Cloud Storage) (LRO)
// description: Print start and end time of each word spoken in audio file from Cloud Storage
// usage: gradle run
// -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeAsyncWordTimeOffsetsGcs
// [--args='[--storage_uri "gs://cloud-samples-data/speech/brooklyn_bridge.flac"]']
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeAsyncWordTimeOffsetsGcs [--args='[--storage_uri "gs://cloud-samples-data/speech/brooklyn_bridge.flac"]']

package com.google.cloud.examples.speech.v1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
// sample-metadata:
// title: Using Enhanced Models (Local File)
// description: Transcribe a short audio file using an enhanced model
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeEnhancedModel
// [--args='[--local_file_path "resources/hello.wav"]']
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeEnhancedModel [--args='[--local_file_path "resources/hello.wav"]']

package com.google.cloud.examples.speech.v1;

Expand Down Expand Up @@ -71,7 +70,6 @@ public static void sampleRecognize(String localFilePath) {
try (SpeechClient speechClient = SpeechClient.create()) {

// The enhanced model to use, e.g. phone_call
// Currently phone_call is the only model available as an enhanced model.
String model = "phone_call";

// Use an enhanced model for speech recognition (when set to true).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
// sample-metadata:
// title: Selecting a Transcription Model (Local File)
// description: Transcribe a short audio file using a specified transcription model
// usage: gradle run
// -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeModelSelection
// [--args='[--local_file_path "resources/hello.wav"] [--model "phone_call"]']
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeModelSelection [--args='[--local_file_path "resources/hello.wav"] [--model "phone_call"]']

package com.google.cloud.examples.speech.v1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@
// DO NOT EDIT! This is a generated sample ("Request", "speech_transcribe_model_selection_gcs")
// sample-metadata:
// title: Selecting a Transcription Model (Cloud Storage)
// description: Transcribe a short audio file from Cloud Storage using a specified transcription
// model
// usage: gradle run
// -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeModelSelectionGcs
// [--args='[--storage_uri "gs://cloud-samples-data/speech/hello.wav"] [--model "phone_call"]']
// description: Transcribe a short audio file from Cloud Storage using a specified transcription model
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeModelSelectionGcs [--args='[--storage_uri "gs://cloud-samples-data/speech/hello.wav"] [--model "phone_call"]']

package com.google.cloud.examples.speech.v1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
// sample-metadata:
// title: Multi-Channel Audio Transcription (Local File)
// description: Transcribe a short audio file with multiple channels
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeMultichannel
// [--args='[--local_file_path "resources/multi.wav"]']
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeMultichannel [--args='[--local_file_path "resources/multi.wav"]']

package com.google.cloud.examples.speech.v1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
// sample-metadata:
// title: Multi-Channel Audio Transcription (Cloud Storage)
// description: Transcribe a short audio file from Cloud Storage with multiple channels
// usage: gradle run
// -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeMultichannelGcs
// [--args='[--storage_uri "gs://cloud-samples-data/speech/multi.wav"]']
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeMultichannelGcs [--args='[--storage_uri "gs://cloud-samples-data/speech/multi.wav"]']

package com.google.cloud.examples.speech.v1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
// sample-metadata:
// title: Transcribe Audio File (Local File)
// description: Transcribe a short audio file using synchronous speech recognition
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeSync
// [--args='[--local_file_path "resources/brooklyn_bridge.raw"]']
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeSync [--args='[--local_file_path "resources/brooklyn_bridge.raw"]']

package com.google.cloud.examples.speech.v1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
// DO NOT EDIT! This is a generated sample ("Request", "speech_transcribe_sync_gcs")
// sample-metadata:
// title: Transcript Audio File (Cloud Storage)
// description: Transcribe short audio file from Cloud Storage using synchronous speech
// recognition
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeSyncGcs
// [--args='[--storage_uri "gs://cloud-samples-data/speech/brooklyn_bridge.raw"]']
// description: Transcribe short audio file from Cloud Storage using synchronous speech recognition
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1.SpeechTranscribeSyncGcs [--args='[--storage_uri "gs://cloud-samples-data/speech/brooklyn_bridge.raw"]']

package com.google.cloud.examples.speech.v1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@ java: &java
package: "com.google.cloud.examples.speech.v1"
invocation: "{bin} -Dexec.mainClass={class} -Dexec.args='@args'"
samples:
- <<: *java
sample: "speech_transcribe_multichannel"
path: "{base_path}/SpeechTranscribeMultichannel.java"
class: "{package}.SpeechTranscribeMultichannel"
region_tag: "speech_transcribe_multichannel"
- <<: *java
sample: "speech_transcribe_multichannel_gcs"
path: "{base_path}/SpeechTranscribeMultichannelGcs.java"
class: "{package}.SpeechTranscribeMultichannelGcs"
region_tag: "speech_transcribe_multichannel_gcs"
- <<: *java
sample: "speech_transcribe_sync"
path: "{base_path}/SpeechTranscribeSync.java"
class: "{package}.SpeechTranscribeSync"
region_tag: "speech_transcribe_sync"
- <<: *java
sample: "speech_transcribe_model_selection_gcs"
path: "{base_path}/SpeechTranscribeModelSelectionGcs.java"
Expand All @@ -18,41 +33,26 @@ samples:
path: "{base_path}/SpeechTranscribeModelSelection.java"
class: "{package}.SpeechTranscribeModelSelection"
region_tag: "speech_transcribe_model_selection"
- <<: *java
sample: "speech_transcribe_multichannel_gcs"
path: "{base_path}/SpeechTranscribeMultichannelGcs.java"
class: "{package}.SpeechTranscribeMultichannelGcs"
region_tag: "speech_transcribe_multichannel_gcs"
- <<: *java
sample: "speech_transcribe_sync_gcs"
path: "{base_path}/SpeechTranscribeSyncGcs.java"
class: "{package}.SpeechTranscribeSyncGcs"
region_tag: "speech_transcribe_sync_gcs"
- <<: *java
sample: "speech_transcribe_enhanced_model"
path: "{base_path}/SpeechTranscribeEnhancedModel.java"
class: "{package}.SpeechTranscribeEnhancedModel"
region_tag: "speech_transcribe_enhanced_model"
- <<: *java
sample: "speech_transcribe_multichannel"
path: "{base_path}/SpeechTranscribeMultichannel.java"
class: "{package}.SpeechTranscribeMultichannel"
region_tag: "speech_transcribe_multichannel"
sample: "speech_transcribe_sync_gcs"
path: "{base_path}/SpeechTranscribeSyncGcs.java"
class: "{package}.SpeechTranscribeSyncGcs"
region_tag: "speech_transcribe_sync_gcs"
- <<: *java
sample: "speech_transcribe_sync"
path: "{base_path}/SpeechTranscribeSync.java"
class: "{package}.SpeechTranscribeSync"
region_tag: "speech_transcribe_sync"
sample: "speech_transcribe_async_gcs"
path: "{base_path}/SpeechTranscribeAsyncGcs.java"
class: "{package}.SpeechTranscribeAsyncGcs"
region_tag: "speech_transcribe_async_gcs"
- <<: *java
sample: "speech_transcribe_async"
path: "{base_path}/SpeechTranscribeAsync.java"
class: "{package}.SpeechTranscribeAsync"
region_tag: "speech_transcribe_async"
- <<: *java
sample: "speech_transcribe_async_gcs"
path: "{base_path}/SpeechTranscribeAsyncGcs.java"
class: "{package}.SpeechTranscribeAsyncGcs"
region_tag: "speech_transcribe_async_gcs"
- <<: *java
sample: "speech_transcribe_async_word_time_offsets_gcs"
path: "{base_path}/SpeechTranscribeAsyncWordTimeOffsetsGcs.java"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
// sample-metadata:
// title: Speech Adaptation (Cloud Storage)
// description: Transcribe a short audio file with speech adaptation.
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1p1beta1.SpeechAdaptationBeta
// [--args='[--storage_uri "gs://cloud-samples-data/speech/brooklyn_bridge.mp3"] [--phrase "Brooklyn
// Bridge"]']
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1p1beta1.SpeechAdaptationBeta [--args='[--storage_uri "gs://cloud-samples-data/speech/brooklyn_bridge.mp3"] [--phrase "Brooklyn Bridge"]']

package com.google.cloud.examples.speech.v1p1beta1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
// sample-metadata:
// title: Using Context Classes (Cloud Storage)
// description: Transcribe a short audio file with static context classes.
// usage: gradle run
// -PmainClass=com.google.cloud.examples.speech.v1p1beta1.SpeechContextsClassesBeta
// [--args='[--storage_uri "gs://cloud-samples-data/speech/time.mp3"] [--phrase "$TIME"]']
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1p1beta1.SpeechContextsClassesBeta [--args='[--storage_uri "gs://cloud-samples-data/speech/time.mp3"] [--phrase "$TIME"]']

package com.google.cloud.examples.speech.v1p1beta1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
// sample-metadata:
// title: Quickstart Beta
// description: Performs synchronous speech recognition on an audio file
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1p1beta1.SpeechQuickstartBeta
// [--args='[--storage_uri "gs://cloud-samples-data/speech/brooklyn_bridge.mp3"]']
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1p1beta1.SpeechQuickstartBeta [--args='[--storage_uri "gs://cloud-samples-data/speech/brooklyn_bridge.mp3"]']

package com.google.cloud.examples.speech.v1p1beta1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
// sample-metadata:
// title: Getting punctuation in results (Local File) (Beta)
// description: Transcribe a short audio file with punctuation
// usage: gradle run
// -PmainClass=com.google.cloud.examples.speech.v1p1beta1.SpeechTranscribeAutoPunctuationBeta
// [--args='[--local_file_path "resources/commercial_mono.wav"]']
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1p1beta1.SpeechTranscribeAutoPunctuationBeta [--args='[--local_file_path "resources/commercial_mono.wav"]']

package com.google.cloud.examples.speech.v1p1beta1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// DO NOT EDIT! This is a generated sample ("LongRunningRequestAsync",
// "speech_transcribe_diarization_beta")
// DO NOT EDIT! This is a generated sample ("LongRunningRequestAsync", "speech_transcribe_diarization_beta")
// sample-metadata:
// title: Separating different speakers (Local File) (LRO) (Beta)
// description: Print confidence level for individual words in a transcription of a short audio
// file
// description: Print confidence level for individual words in a transcription of a short audio file
// Separating different speakers in an audio file recording
// usage: gradle run
// -PmainClass=com.google.cloud.examples.speech.v1p1beta1.SpeechTranscribeDiarizationBeta
// [--args='[--local_file_path "resources/commercial_mono.wav"]']
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1p1beta1.SpeechTranscribeDiarizationBeta [--args='[--local_file_path "resources/commercial_mono.wav"]']

package com.google.cloud.examples.speech.v1p1beta1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@
// DO NOT EDIT! This is a generated sample ("Request", "speech_transcribe_multilanguage_beta")
// sample-metadata:
// title: Detecting language spoken automatically (Local File) (Beta)
// description: Transcribe a short audio file with language detected from a list of possible
// languages
// usage: gradle run
// -PmainClass=com.google.cloud.examples.speech.v1p1beta1.SpeechTranscribeMultilanguageBeta
// [--args='[--local_file_path "resources/brooklyn_bridge.flac"]']
// description: Transcribe a short audio file with language detected from a list of possible languages
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1p1beta1.SpeechTranscribeMultilanguageBeta [--args='[--local_file_path "resources/brooklyn_bridge.flac"]']

package com.google.cloud.examples.speech.v1p1beta1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// DO NOT EDIT! This is a generated sample ("Request",
// "speech_transcribe_recognition_metadata_beta")
// DO NOT EDIT! This is a generated sample ("Request", "speech_transcribe_recognition_metadata_beta")
// sample-metadata:
// title: Adding recognition metadata (Local File) (Beta)
// description: Adds additional details short audio file included in this recognition request
// usage: gradle run
// -PmainClass=com.google.cloud.examples.speech.v1p1beta1.SpeechTranscribeRecognitionMetadataBeta
// [--args='[--local_file_path "resources/commercial_mono.wav"]']
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1p1beta1.SpeechTranscribeRecognitionMetadataBeta [--args='[--local_file_path "resources/commercial_mono.wav"]']

package com.google.cloud.examples.speech.v1p1beta1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// DO NOT EDIT! This is a generated sample ("Request",
// "speech_transcribe_word_level_confidence_beta")
// DO NOT EDIT! This is a generated sample ("Request", "speech_transcribe_word_level_confidence_beta")
// sample-metadata:
// title: Enabling word-level confidence (Local File) (Beta)
// description: Print confidence level for individual words in a transcription of a short audio
// file.
// usage: gradle run
// -PmainClass=com.google.cloud.examples.speech.v1p1beta1.SpeechTranscribeWordLevelConfidenceBeta
// [--args='[--local_file_path "resources/brooklyn_bridge.flac"]']
// description: Print confidence level for individual words in a transcription of a short audio file.
// usage: gradle run -PmainClass=com.google.cloud.examples.speech.v1p1beta1.SpeechTranscribeWordLevelConfidenceBeta [--args='[--local_file_path "resources/brooklyn_bridge.flac"]']

package com.google.cloud.examples.speech.v1p1beta1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,31 @@ java: &java
package: "com.google.cloud.examples.speech.v1p1beta1"
invocation: "{bin} -Dexec.mainClass={class} -Dexec.args='@args'"
samples:
- <<: *java
sample: "speech_transcribe_multilanguage_beta"
path: "{base_path}/SpeechTranscribeMultilanguageBeta.java"
class: "{package}.SpeechTranscribeMultilanguageBeta"
region_tag: "speech_transcribe_multilanguage_beta"
- <<: *java
sample: "speech_transcribe_recognition_metadata_beta"
path: "{base_path}/SpeechTranscribeRecognitionMetadataBeta.java"
class: "{package}.SpeechTranscribeRecognitionMetadataBeta"
region_tag: "speech_transcribe_recognition_metadata_beta"
- <<: *java
sample: "speech_contexts_classes_beta"
path: "{base_path}/SpeechContextsClassesBeta.java"
class: "{package}.SpeechContextsClassesBeta"
region_tag: "speech_contexts_classes_beta"
- <<: *java
sample: "speech_adaptation_beta"
path: "{base_path}/SpeechAdaptationBeta.java"
class: "{package}.SpeechAdaptationBeta"
region_tag: "speech_adaptation_beta"
- <<: *java
sample: "speech_transcribe_word_level_confidence_beta"
path: "{base_path}/SpeechTranscribeWordLevelConfidenceBeta.java"
class: "{package}.SpeechTranscribeWordLevelConfidenceBeta"
region_tag: "speech_transcribe_word_level_confidence_beta"
- <<: *java
sample: "speech_transcribe_auto_punctuation_beta"
path: "{base_path}/SpeechTranscribeAutoPunctuationBeta.java"
Expand All @@ -23,26 +43,6 @@ samples:
path: "{base_path}/SpeechQuickstartBeta.java"
class: "{package}.SpeechQuickstartBeta"
region_tag: "speech_quickstart_beta"
- <<: *java
sample: "speech_transcribe_word_level_confidence_beta"
path: "{base_path}/SpeechTranscribeWordLevelConfidenceBeta.java"
class: "{package}.SpeechTranscribeWordLevelConfidenceBeta"
region_tag: "speech_transcribe_word_level_confidence_beta"
- <<: *java
sample: "speech_adaptation_beta"
path: "{base_path}/SpeechAdaptationBeta.java"
class: "{package}.SpeechAdaptationBeta"
region_tag: "speech_adaptation_beta"
- <<: *java
sample: "speech_transcribe_multilanguage_beta"
path: "{base_path}/SpeechTranscribeMultilanguageBeta.java"
class: "{package}.SpeechTranscribeMultilanguageBeta"
region_tag: "speech_transcribe_multilanguage_beta"
- <<: *java
sample: "speech_transcribe_recognition_metadata_beta"
path: "{base_path}/SpeechTranscribeRecognitionMetadataBeta.java"
class: "{package}.SpeechTranscribeRecognitionMetadataBeta"
region_tag: "speech_transcribe_recognition_metadata_beta"
- <<: *java
sample: "speech_transcribe_diarization_beta"
path: "{base_path}/SpeechTranscribeDiarizationBeta.java"
Expand Down
Loading

0 comments on commit f026bfc

Please sign in to comment.