{ "clientLibrary": { "name": "cloud.google.com/go/speech/apiv1", "version": "1.28.0", "language": "GO", "apis": [ { "id": "google.cloud.speech.v1", "version": "v1" } ] }, "snippets": [ { "regionTag": "speech_v1_generated_Adaptation_CreateCustomClass_sync", "title": "speech CreateCustomClass Sample", "description": "CreateCustomClass create a custom class.", "file": "AdaptationClient/CreateCustomClass/main.go", "language": "GO", "clientMethod": { "shortName": "CreateCustomClass", "fullName": "google.cloud.speech.v1.AdaptationClient.CreateCustomClass", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "speechpb.CreateCustomClassRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*speechpb.CustomClass", "client": { "shortName": "AdaptationClient", "fullName": "google.cloud.speech.v1.AdaptationClient" }, "method": { "shortName": "CreateCustomClass", "fullName": "google.cloud.speech.v1.Adaptation.CreateCustomClass", "service": { "shortName": "Adaptation", "fullName": "google.cloud.speech.v1.Adaptation" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "speech_v1_generated_Adaptation_CreatePhraseSet_sync", "title": "speech CreatePhraseSet Sample", "description": "CreatePhraseSet create a set of phrase hints. Each item in the set can be a single word or\na multi-word phrase. The items in the PhraseSet are favored by the\nrecognition model when you send a call that includes the PhraseSet.", "file": "AdaptationClient/CreatePhraseSet/main.go", "language": "GO", "clientMethod": { "shortName": "CreatePhraseSet", "fullName": "google.cloud.speech.v1.AdaptationClient.CreatePhraseSet", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "speechpb.CreatePhraseSetRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*speechpb.PhraseSet", "client": { "shortName": "AdaptationClient", "fullName": "google.cloud.speech.v1.AdaptationClient" }, "method": { "shortName": "CreatePhraseSet", "fullName": "google.cloud.speech.v1.Adaptation.CreatePhraseSet", "service": { "shortName": "Adaptation", "fullName": "google.cloud.speech.v1.Adaptation" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "speech_v1_generated_Adaptation_DeleteCustomClass_sync", "title": "speech DeleteCustomClass Sample", "description": "DeleteCustomClass delete a custom class.", "file": "AdaptationClient/DeleteCustomClass/main.go", "language": "GO", "clientMethod": { "shortName": "DeleteCustomClass", "fullName": "google.cloud.speech.v1.AdaptationClient.DeleteCustomClass", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "speechpb.DeleteCustomClassRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "client": { "shortName": "AdaptationClient", "fullName": "google.cloud.speech.v1.AdaptationClient" }, "method": { "shortName": "DeleteCustomClass", "fullName": "google.cloud.speech.v1.Adaptation.DeleteCustomClass", "service": { "shortName": "Adaptation", "fullName": "google.cloud.speech.v1.Adaptation" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 51, "type": "FULL" } ] }, { "regionTag": "speech_v1_generated_Adaptation_DeletePhraseSet_sync", "title": "speech DeletePhraseSet Sample", "description": "DeletePhraseSet delete a phrase set.", "file": "AdaptationClient/DeletePhraseSet/main.go", "language": "GO", "clientMethod": { "shortName": "DeletePhraseSet", "fullName": "google.cloud.speech.v1.AdaptationClient.DeletePhraseSet", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "speechpb.DeletePhraseSetRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "client": { "shortName": "AdaptationClient", "fullName": "google.cloud.speech.v1.AdaptationClient" }, "method": { "shortName": "DeletePhraseSet", "fullName": "google.cloud.speech.v1.Adaptation.DeletePhraseSet", "service": { "shortName": "Adaptation", "fullName": "google.cloud.speech.v1.Adaptation" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 51, "type": "FULL" } ] }, { "regionTag": "speech_v1_generated_Adaptation_GetCustomClass_sync", "title": "speech GetCustomClass Sample", "description": "GetCustomClass get a custom class.", "file": "AdaptationClient/GetCustomClass/main.go", "language": "GO", "clientMethod": { "shortName": "GetCustomClass", "fullName": "google.cloud.speech.v1.AdaptationClient.GetCustomClass", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "speechpb.GetCustomClassRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*speechpb.CustomClass", "client": { "shortName": "AdaptationClient", "fullName": "google.cloud.speech.v1.AdaptationClient" }, "method": { "shortName": "GetCustomClass", "fullName": "google.cloud.speech.v1.Adaptation.GetCustomClass", "service": { "shortName": "Adaptation", "fullName": "google.cloud.speech.v1.Adaptation" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "speech_v1_generated_Adaptation_GetOperation_sync", "title": "speech GetOperation Sample", "description": "GetOperation is a utility method from google.longrunning.Operations.", "file": "AdaptationClient/GetOperation/main.go", "language": "GO", "clientMethod": { "shortName": "GetOperation", "fullName": "google.cloud.speech.v1.AdaptationClient.GetOperation", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "longrunningpb.GetOperationRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*longrunningpb.Operation", "client": { "shortName": "AdaptationClient", "fullName": "google.cloud.speech.v1.AdaptationClient" }, "method": { "shortName": "GetOperation", "fullName": "google.longrunning.Operations.GetOperation", "service": { "shortName": "Operations", "fullName": "google.longrunning.Operations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "speech_v1_generated_Adaptation_GetPhraseSet_sync", "title": "speech GetPhraseSet Sample", "description": "GetPhraseSet get a phrase set.", "file": "AdaptationClient/GetPhraseSet/main.go", "language": "GO", "clientMethod": { "shortName": "GetPhraseSet", "fullName": "google.cloud.speech.v1.AdaptationClient.GetPhraseSet", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "speechpb.GetPhraseSetRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*speechpb.PhraseSet", "client": { "shortName": "AdaptationClient", "fullName": "google.cloud.speech.v1.AdaptationClient" }, "method": { "shortName": "GetPhraseSet", "fullName": "google.cloud.speech.v1.Adaptation.GetPhraseSet", "service": { "shortName": "Adaptation", "fullName": "google.cloud.speech.v1.Adaptation" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "speech_v1_generated_Adaptation_ListCustomClasses_sync", "title": "speech ListCustomClasses Sample", "description": "ListCustomClasses list custom classes.", "file": "AdaptationClient/ListCustomClasses/main.go", "language": "GO", "clientMethod": { "shortName": "ListCustomClasses", "fullName": "google.cloud.speech.v1.AdaptationClient.ListCustomClasses", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "speechpb.ListCustomClassesRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "CustomClassIterator", "client": { "shortName": "AdaptationClient", "fullName": "google.cloud.speech.v1.AdaptationClient" }, "method": { "shortName": "ListCustomClasses", "fullName": "google.cloud.speech.v1.Adaptation.ListCustomClasses", "service": { "shortName": "Adaptation", "fullName": "google.cloud.speech.v1.Adaptation" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "speech_v1_generated_Adaptation_ListOperations_sync", "title": "speech ListOperations Sample", "description": "ListOperations is a utility method from google.longrunning.Operations.", "file": "AdaptationClient/ListOperations/main.go", "language": "GO", "clientMethod": { "shortName": "ListOperations", "fullName": "google.cloud.speech.v1.AdaptationClient.ListOperations", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "longrunningpb.ListOperationsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "OperationIterator", "client": { "shortName": "AdaptationClient", "fullName": "google.cloud.speech.v1.AdaptationClient" }, "method": { "shortName": "ListOperations", "fullName": "google.longrunning.Operations.ListOperations", "service": { "shortName": "Operations", "fullName": "google.longrunning.Operations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "speech_v1_generated_Adaptation_ListPhraseSet_sync", "title": "speech ListPhraseSet Sample", "description": "ListPhraseSet list phrase sets.", "file": "AdaptationClient/ListPhraseSet/main.go", "language": "GO", "clientMethod": { "shortName": "ListPhraseSet", "fullName": "google.cloud.speech.v1.AdaptationClient.ListPhraseSet", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "speechpb.ListPhraseSetRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "PhraseSetIterator", "client": { "shortName": "AdaptationClient", "fullName": "google.cloud.speech.v1.AdaptationClient" }, "method": { "shortName": "ListPhraseSet", "fullName": "google.cloud.speech.v1.Adaptation.ListPhraseSet", "service": { "shortName": "Adaptation", "fullName": "google.cloud.speech.v1.Adaptation" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "speech_v1_generated_Adaptation_UpdateCustomClass_sync", "title": "speech UpdateCustomClass Sample", "description": "UpdateCustomClass update a custom class.", "file": "AdaptationClient/UpdateCustomClass/main.go", "language": "GO", "clientMethod": { "shortName": "UpdateCustomClass", "fullName": "google.cloud.speech.v1.AdaptationClient.UpdateCustomClass", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "speechpb.UpdateCustomClassRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*speechpb.CustomClass", "client": { "shortName": "AdaptationClient", "fullName": "google.cloud.speech.v1.AdaptationClient" }, "method": { "shortName": "UpdateCustomClass", "fullName": "google.cloud.speech.v1.Adaptation.UpdateCustomClass", "service": { "shortName": "Adaptation", "fullName": "google.cloud.speech.v1.Adaptation" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "speech_v1_generated_Adaptation_UpdatePhraseSet_sync", "title": "speech UpdatePhraseSet Sample", "description": "UpdatePhraseSet update a phrase set.", "file": "AdaptationClient/UpdatePhraseSet/main.go", "language": "GO", "clientMethod": { "shortName": "UpdatePhraseSet", "fullName": "google.cloud.speech.v1.AdaptationClient.UpdatePhraseSet", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "speechpb.UpdatePhraseSetRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*speechpb.PhraseSet", "client": { "shortName": "AdaptationClient", "fullName": "google.cloud.speech.v1.AdaptationClient" }, "method": { "shortName": "UpdatePhraseSet", "fullName": "google.cloud.speech.v1.Adaptation.UpdatePhraseSet", "service": { "shortName": "Adaptation", "fullName": "google.cloud.speech.v1.Adaptation" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "speech_v1_generated_Speech_GetOperation_sync", "title": "speech GetOperation Sample", "description": "GetOperation is a utility method from google.longrunning.Operations.", "file": "Client/GetOperation/main.go", "language": "GO", "clientMethod": { "shortName": "GetOperation", "fullName": "google.cloud.speech.v1.Client.GetOperation", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "longrunningpb.GetOperationRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*longrunningpb.Operation", "client": { "shortName": "Client", "fullName": "google.cloud.speech.v1.Client" }, "method": { "shortName": "GetOperation", "fullName": "google.longrunning.Operations.GetOperation", "service": { "shortName": "Operations", "fullName": "google.longrunning.Operations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "speech_v1_generated_Speech_ListOperations_sync", "title": "speech ListOperations Sample", "description": "ListOperations is a utility method from google.longrunning.Operations.", "file": "Client/ListOperations/main.go", "language": "GO", "clientMethod": { "shortName": "ListOperations", "fullName": "google.cloud.speech.v1.Client.ListOperations", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "longrunningpb.ListOperationsRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "OperationIterator", "client": { "shortName": "Client", "fullName": "google.cloud.speech.v1.Client" }, "method": { "shortName": "ListOperations", "fullName": "google.longrunning.Operations.ListOperations", "service": { "shortName": "Operations", "fullName": "google.longrunning.Operations" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 66, "type": "FULL" } ] }, { "regionTag": "speech_v1_generated_Speech_LongRunningRecognize_sync", "title": "speech LongRunningRecognize Sample", "description": "LongRunningRecognize performs asynchronous speech recognition: receive results via the\ngoogle.longrunning.Operations interface. Returns either an\n`Operation.error` or an `Operation.response` which contains\na `LongRunningRecognizeResponse` message.\nFor more information on asynchronous speech recognition, see the\n[how-to](https: //cloud.google.com/speech-to-text/docs/async-recognize).", "file": "Client/LongRunningRecognize/main.go", "language": "GO", "clientMethod": { "shortName": "LongRunningRecognize", "fullName": "google.cloud.speech.v1.Client.LongRunningRecognize", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "speechpb.LongRunningRecognizeRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "LongRunningRecognizeOperation", "client": { "shortName": "Client", "fullName": "google.cloud.speech.v1.Client" }, "method": { "shortName": "LongRunningRecognize", "fullName": "google.cloud.speech.v1.Speech.LongRunningRecognize", "service": { "shortName": "Speech", "fullName": "google.cloud.speech.v1.Speech" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 58, "type": "FULL" } ] }, { "regionTag": "speech_v1_generated_Speech_Recognize_sync", "title": "speech Recognize Sample", "description": "Recognize performs synchronous speech recognition: receive results after all audio\nhas been sent and processed.", "file": "Client/Recognize/main.go", "language": "GO", "clientMethod": { "shortName": "Recognize", "fullName": "google.cloud.speech.v1.Client.Recognize", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "speechpb.RecognizeRequest", "name": "req" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "*speechpb.RecognizeResponse", "client": { "shortName": "Client", "fullName": "google.cloud.speech.v1.Client" }, "method": { "shortName": "Recognize", "fullName": "google.cloud.speech.v1.Speech.Recognize", "service": { "shortName": "Speech", "fullName": "google.cloud.speech.v1.Speech" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 53, "type": "FULL" } ] }, { "regionTag": "speech_v1_generated_Speech_StreamingRecognize_sync", "title": "speech StreamingRecognize Sample", "description": "StreamingRecognize performs bidirectional streaming speech recognition: receive results while\nsending audio. This method is only available via the gRPC API (not REST).\n\n\nThis method is not supported for the REST transport.", "file": "Client/StreamingRecognize/main.go", "language": "GO", "clientMethod": { "shortName": "StreamingRecognize", "fullName": "google.cloud.speech.v1.Client.StreamingRecognize", "parameters": [ { "type": "context.Context", "name": "ctx" }, { "type": "...gax.CallOption", "name": "opts" } ], "resultType": "speechpb.Speech_StreamingRecognizeClient", "client": { "shortName": "Client", "fullName": "google.cloud.speech.v1.Client" }, "method": { "shortName": "StreamingRecognize", "fullName": "google.cloud.speech.v1.Speech.StreamingRecognize", "service": { "shortName": "Speech", "fullName": "google.cloud.speech.v1.Speech" } } }, "origin": "API_DEFINITION", "segments": [ { "start": 18, "end": 69, "type": "FULL" } ] } ] }