Cloud Speech V2 Client - Class CreateRecognizerRequest (2.3.0)

Namespace

Google \ Cloud \ Speech \ V2

Methods

__construct

Constructor.

Parameters
NameDescription
dataarray

Optional. Data for populating the Message object.

↳ recognizerRecognizer

Required. The Recognizer to create.

↳ validate_onlybool

If set, validate the request and preview the Recognizer, but do not actually create it.

↳ recognizer_idstring

The ID to use for the Recognizer, which will become the final component of the Recognizer's resource name. This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/.

↳ parentstring

Required. The project and location where this Recognizer will be created. The expected format isprojects/{project}/locations/{location}.

getRecognizer

Required. The Recognizer to create.

Returns
TypeDescription
Recognizer|null

hasRecognizer

clearRecognizer

setRecognizer

Required. The Recognizer to create.

Parameter
NameDescription
varRecognizer
Returns
TypeDescription
$this

getValidateOnly

If set, validate the request and preview the Recognizer, but do notactually create it.

Returns
TypeDescription
bool

setValidateOnly

If set, validate the request and preview the Recognizer, but do notactually create it.

Parameter
NameDescription
varbool
Returns
TypeDescription
$this

getRecognizerId

The ID to use for the Recognizer, which will become the final component ofthe Recognizer's resource name.

This value should be 4-63 characters, and valid charactersare /[a-z][0-9]-/.

Returns
TypeDescription
string

setRecognizerId

The ID to use for the Recognizer, which will become the final component ofthe Recognizer's resource name.

This value should be 4-63 characters, and valid charactersare /[a-z][0-9]-/.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

getParent

Required. The project and location where this Recognizer will be created.

The expected format isprojects/{project}/locations/{location}.

Returns
TypeDescription
string

setParent

Required. The project and location where this Recognizer will be created.

The expected format isprojects/{project}/locations/{location}.

Parameter
NameDescription
varstring
Returns
TypeDescription
$this

static::build

Parameters
NameDescription
parentstring

Required. The project and location where this Recognizer will be created.The expected format isprojects/{project}/locations/{location}. Please seeSpeechClient::locationName() for help formatting this field.

recognizerRecognizer

Required. The Recognizer to create.

recognizerIdstring

The ID to use for the Recognizer, which will become the final component ofthe Recognizer's resource name.

This value should be 4-63 characters, and valid charactersare /[a-z][0-9]-/.

Returns
TypeDescription
CreateRecognizerRequest

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-01-23 UTC.