mirror of
https://github.com/jambonz/speech-utils.git
synced 2025-12-19 03:37:49 +00:00
1279 lines
42 KiB
JavaScript
1279 lines
42 KiB
JavaScript
// source: riva/proto/riva_tts.proto
|
|
/**
|
|
* @fileoverview
|
|
* @enhanceable
|
|
* @suppress {missingRequire} reports error on implicit type usages.
|
|
* @suppress {messageConventions} JS Compiler reports an error if a variable or
|
|
* field starts with 'MSG_' and isn't a translatable message.
|
|
* @public
|
|
*/
|
|
// GENERATED CODE -- DO NOT EDIT!
|
|
/* eslint-disable */
|
|
// @ts-nocheck
|
|
|
|
var jspb = require('google-protobuf');
|
|
var goog = jspb;
|
|
var global = Function('return this')();
|
|
|
|
var riva_proto_riva_audio_pb = require('../../riva/proto/riva_audio_pb.js');
|
|
goog.object.extend(proto, riva_proto_riva_audio_pb);
|
|
goog.exportSymbol('proto.nvidia.riva.tts.RivaSynthesisConfigRequest', null, global);
|
|
goog.exportSymbol('proto.nvidia.riva.tts.RivaSynthesisConfigResponse', null, global);
|
|
goog.exportSymbol('proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config', null, global);
|
|
goog.exportSymbol('proto.nvidia.riva.tts.SynthesizeSpeechRequest', null, global);
|
|
goog.exportSymbol('proto.nvidia.riva.tts.SynthesizeSpeechResponse', null, global);
|
|
goog.exportSymbol('proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata', null, global);
|
|
/**
|
|
* Generated by JsPbCodeGenerator.
|
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
* server response, or constructed directly in Javascript. The array is used
|
|
* in place and becomes part of the constructed object. It is not cloned.
|
|
* If no data is provided, the constructed object will be empty, but still
|
|
* valid.
|
|
* @extends {jspb.Message}
|
|
* @constructor
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigRequest = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.nvidia.riva.tts.RivaSynthesisConfigRequest, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigRequest.displayName = 'proto.nvidia.riva.tts.RivaSynthesisConfigRequest';
|
|
}
|
|
/**
|
|
* Generated by JsPbCodeGenerator.
|
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
* server response, or constructed directly in Javascript. The array is used
|
|
* in place and becomes part of the constructed object. It is not cloned.
|
|
* If no data is provided, the constructed object will be empty, but still
|
|
* valid.
|
|
* @extends {jspb.Message}
|
|
* @constructor
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.nvidia.riva.tts.RivaSynthesisConfigResponse.repeatedFields_, null);
|
|
};
|
|
goog.inherits(proto.nvidia.riva.tts.RivaSynthesisConfigResponse, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.displayName = 'proto.nvidia.riva.tts.RivaSynthesisConfigResponse';
|
|
}
|
|
/**
|
|
* Generated by JsPbCodeGenerator.
|
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
* server response, or constructed directly in Javascript. The array is used
|
|
* in place and becomes part of the constructed object. It is not cloned.
|
|
* If no data is provided, the constructed object will be empty, but still
|
|
* valid.
|
|
* @extends {jspb.Message}
|
|
* @constructor
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.displayName = 'proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config';
|
|
}
|
|
/**
|
|
* Generated by JsPbCodeGenerator.
|
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
* server response, or constructed directly in Javascript. The array is used
|
|
* in place and becomes part of the constructed object. It is not cloned.
|
|
* If no data is provided, the constructed object will be empty, but still
|
|
* valid.
|
|
* @extends {jspb.Message}
|
|
* @constructor
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.nvidia.riva.tts.SynthesizeSpeechRequest, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.displayName = 'proto.nvidia.riva.tts.SynthesizeSpeechRequest';
|
|
}
|
|
/**
|
|
* Generated by JsPbCodeGenerator.
|
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
* server response, or constructed directly in Javascript. The array is used
|
|
* in place and becomes part of the constructed object. It is not cloned.
|
|
* If no data is provided, the constructed object will be empty, but still
|
|
* valid.
|
|
* @extends {jspb.Message}
|
|
* @constructor
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.repeatedFields_, null);
|
|
};
|
|
goog.inherits(proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.displayName = 'proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata';
|
|
}
|
|
/**
|
|
* Generated by JsPbCodeGenerator.
|
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
* server response, or constructed directly in Javascript. The array is used
|
|
* in place and becomes part of the constructed object. It is not cloned.
|
|
* If no data is provided, the constructed object will be empty, but still
|
|
* valid.
|
|
* @extends {jspb.Message}
|
|
* @constructor
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.nvidia.riva.tts.SynthesizeSpeechResponse, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse.displayName = 'proto.nvidia.riva.tts.SynthesizeSpeechResponse';
|
|
}
|
|
|
|
|
|
|
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
/**
|
|
* Creates an object representation of this proto.
|
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
* Optional fields that are not set will be set to undefined.
|
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
* For the list of reserved names please see:
|
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
* JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @return {!Object}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigRequest.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.nvidia.riva.tts.RivaSynthesisConfigRequest.toObject(opt_includeInstance, this);
|
|
};
|
|
|
|
|
|
/**
|
|
* Static version of the {@see toObject} method.
|
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
* the JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @param {!proto.nvidia.riva.tts.RivaSynthesisConfigRequest} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigRequest.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
modelName: jspb.Message.getFieldWithDefault(msg, 1, "")
|
|
};
|
|
|
|
if (includeInstance) {
|
|
obj.$jspbMessageInstance = msg;
|
|
}
|
|
return obj;
|
|
};
|
|
}
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format).
|
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
* @return {!proto.nvidia.riva.tts.RivaSynthesisConfigRequest}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigRequest.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.nvidia.riva.tts.RivaSynthesisConfigRequest;
|
|
return proto.nvidia.riva.tts.RivaSynthesisConfigRequest.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.nvidia.riva.tts.RivaSynthesisConfigRequest} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.nvidia.riva.tts.RivaSynthesisConfigRequest}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
case 1:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setModelName(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigRequest.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigRequest.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.nvidia.riva.tts.RivaSynthesisConfigRequest} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigRequest.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getModelName();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string model_name = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigRequest.prototype.getModelName = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.nvidia.riva.tts.RivaSynthesisConfigRequest} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigRequest.prototype.setModelName = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
* List of repeated fields within this message type.
|
|
* @private {!Array<number>}
|
|
* @const
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.repeatedFields_ = [1];
|
|
|
|
|
|
|
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
/**
|
|
* Creates an object representation of this proto.
|
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
* Optional fields that are not set will be set to undefined.
|
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
* For the list of reserved names please see:
|
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
* JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @return {!Object}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.nvidia.riva.tts.RivaSynthesisConfigResponse.toObject(opt_includeInstance, this);
|
|
};
|
|
|
|
|
|
/**
|
|
* Static version of the {@see toObject} method.
|
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
* the JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @param {!proto.nvidia.riva.tts.RivaSynthesisConfigResponse} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
modelConfigList: jspb.Message.toObjectList(msg.getModelConfigList(),
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.toObject, includeInstance)
|
|
};
|
|
|
|
if (includeInstance) {
|
|
obj.$jspbMessageInstance = msg;
|
|
}
|
|
return obj;
|
|
};
|
|
}
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format).
|
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
* @return {!proto.nvidia.riva.tts.RivaSynthesisConfigResponse}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.nvidia.riva.tts.RivaSynthesisConfigResponse;
|
|
return proto.nvidia.riva.tts.RivaSynthesisConfigResponse.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.nvidia.riva.tts.RivaSynthesisConfigResponse} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.nvidia.riva.tts.RivaSynthesisConfigResponse}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
case 1:
|
|
var value = new proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config;
|
|
reader.readMessage(value,proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.deserializeBinaryFromReader);
|
|
msg.addModelConfig(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.nvidia.riva.tts.RivaSynthesisConfigResponse} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getModelConfigList();
|
|
if (f.length > 0) {
|
|
writer.writeRepeatedMessage(
|
|
1,
|
|
f,
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.serializeBinaryToWriter
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
/**
|
|
* Creates an object representation of this proto.
|
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
* Optional fields that are not set will be set to undefined.
|
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
* For the list of reserved names please see:
|
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
* JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @return {!Object}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.toObject(opt_includeInstance, this);
|
|
};
|
|
|
|
|
|
/**
|
|
* Static version of the {@see toObject} method.
|
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
* the JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @param {!proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
modelName: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
parametersMap: (f = msg.getParametersMap()) ? f.toObject(includeInstance, undefined) : []
|
|
};
|
|
|
|
if (includeInstance) {
|
|
obj.$jspbMessageInstance = msg;
|
|
}
|
|
return obj;
|
|
};
|
|
}
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format).
|
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
* @return {!proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config;
|
|
return proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
case 1:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setModelName(value);
|
|
break;
|
|
case 2:
|
|
var value = msg.getParametersMap();
|
|
reader.readMessage(value, function(message, reader) {
|
|
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
|
|
});
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getModelName();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getParametersMap(true);
|
|
if (f && f.getLength() > 0) {
|
|
f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string model_name = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.prototype.getModelName = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.prototype.setModelName = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* map<string, string> parameters = 2;
|
|
* @param {boolean=} opt_noLazyCreate Do not create the map if
|
|
* empty, instead returning `undefined`
|
|
* @return {!jspb.Map<string,string>}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.prototype.getParametersMap = function(opt_noLazyCreate) {
|
|
return /** @type {!jspb.Map<string,string>} */ (
|
|
jspb.Message.getMapField(this, 2, opt_noLazyCreate,
|
|
null));
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears values from the map. The map will be non-null.
|
|
* @return {!proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config.prototype.clearParametersMap = function() {
|
|
this.getParametersMap().clear();
|
|
return this;};
|
|
|
|
|
|
/**
|
|
* repeated Config model_config = 1;
|
|
* @return {!Array<!proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config>}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.prototype.getModelConfigList = function() {
|
|
return /** @type{!Array<!proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config>} */ (
|
|
jspb.Message.getRepeatedWrapperField(this, proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config, 1));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!Array<!proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config>} value
|
|
* @return {!proto.nvidia.riva.tts.RivaSynthesisConfigResponse} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.prototype.setModelConfigList = function(value) {
|
|
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config=} opt_value
|
|
* @param {number=} opt_index
|
|
* @return {!proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config}
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.prototype.addModelConfig = function(opt_value, opt_index) {
|
|
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.nvidia.riva.tts.RivaSynthesisConfigResponse.Config, opt_index);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the list making it empty but non-null.
|
|
* @return {!proto.nvidia.riva.tts.RivaSynthesisConfigResponse} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.RivaSynthesisConfigResponse.prototype.clearModelConfigList = function() {
|
|
return this.setModelConfigList([]);
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
/**
|
|
* Creates an object representation of this proto.
|
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
* Optional fields that are not set will be set to undefined.
|
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
* For the list of reserved names please see:
|
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
* JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @return {!Object}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.nvidia.riva.tts.SynthesizeSpeechRequest.toObject(opt_includeInstance, this);
|
|
};
|
|
|
|
|
|
/**
|
|
* Static version of the {@see toObject} method.
|
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
* the JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @param {!proto.nvidia.riva.tts.SynthesizeSpeechRequest} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
text: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
languageCode: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
encoding: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
|
sampleRateHz: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
|
voiceName: jspb.Message.getFieldWithDefault(msg, 5, "")
|
|
};
|
|
|
|
if (includeInstance) {
|
|
obj.$jspbMessageInstance = msg;
|
|
}
|
|
return obj;
|
|
};
|
|
}
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format).
|
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechRequest}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.nvidia.riva.tts.SynthesizeSpeechRequest;
|
|
return proto.nvidia.riva.tts.SynthesizeSpeechRequest.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.nvidia.riva.tts.SynthesizeSpeechRequest} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechRequest}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
case 1:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setText(value);
|
|
break;
|
|
case 2:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setLanguageCode(value);
|
|
break;
|
|
case 3:
|
|
var value = /** @type {!proto.nvidia.riva.AudioEncoding} */ (reader.readEnum());
|
|
msg.setEncoding(value);
|
|
break;
|
|
case 4:
|
|
var value = /** @type {number} */ (reader.readInt32());
|
|
msg.setSampleRateHz(value);
|
|
break;
|
|
case 5:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setVoiceName(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.nvidia.riva.tts.SynthesizeSpeechRequest} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getText();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getLanguageCode();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
f = message.getEncoding();
|
|
if (f !== 0.0) {
|
|
writer.writeEnum(
|
|
3,
|
|
f
|
|
);
|
|
}
|
|
f = message.getSampleRateHz();
|
|
if (f !== 0) {
|
|
writer.writeInt32(
|
|
4,
|
|
f
|
|
);
|
|
}
|
|
f = message.getVoiceName();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
5,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string text = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.prototype.getText = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechRequest} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.prototype.setText = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string language_code = 2;
|
|
* @return {string}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.prototype.getLanguageCode = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechRequest} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.prototype.setLanguageCode = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional nvidia.riva.AudioEncoding encoding = 3;
|
|
* @return {!proto.nvidia.riva.AudioEncoding}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.prototype.getEncoding = function() {
|
|
return /** @type {!proto.nvidia.riva.AudioEncoding} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!proto.nvidia.riva.AudioEncoding} value
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechRequest} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.prototype.setEncoding = function(value) {
|
|
return jspb.Message.setProto3EnumField(this, 3, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional int32 sample_rate_hz = 4;
|
|
* @return {number}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.prototype.getSampleRateHz = function() {
|
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {number} value
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechRequest} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.prototype.setSampleRateHz = function(value) {
|
|
return jspb.Message.setProto3IntField(this, 4, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string voice_name = 5;
|
|
* @return {string}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.prototype.getVoiceName = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechRequest} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechRequest.prototype.setVoiceName = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 5, value);
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
* List of repeated fields within this message type.
|
|
* @private {!Array<number>}
|
|
* @const
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.repeatedFields_ = [8];
|
|
|
|
|
|
|
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
/**
|
|
* Creates an object representation of this proto.
|
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
* Optional fields that are not set will be set to undefined.
|
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
* For the list of reserved names please see:
|
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
* JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @return {!Object}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.toObject(opt_includeInstance, this);
|
|
};
|
|
|
|
|
|
/**
|
|
* Static version of the {@see toObject} method.
|
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
* the JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @param {!proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
text: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
processedText: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
predictedDurationsList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 8)) == null ? undefined : f
|
|
};
|
|
|
|
if (includeInstance) {
|
|
obj.$jspbMessageInstance = msg;
|
|
}
|
|
return obj;
|
|
};
|
|
}
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format).
|
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata;
|
|
return proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
case 1:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setText(value);
|
|
break;
|
|
case 2:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setProcessedText(value);
|
|
break;
|
|
case 8:
|
|
var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedFloat() : [reader.readFloat()]);
|
|
for (var i = 0; i < values.length; i++) {
|
|
msg.addPredictedDurations(values[i]);
|
|
}
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getText();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getProcessedText();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
f = message.getPredictedDurationsList();
|
|
if (f.length > 0) {
|
|
writer.writePackedFloat(
|
|
8,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string text = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.prototype.getText = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.prototype.setText = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string processed_text = 2;
|
|
* @return {string}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.prototype.getProcessedText = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.prototype.setProcessedText = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* repeated float predicted_durations = 8;
|
|
* @return {!Array<number>}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.prototype.getPredictedDurationsList = function() {
|
|
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedFloatingPointField(this, 8));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!Array<number>} value
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.prototype.setPredictedDurationsList = function(value) {
|
|
return jspb.Message.setField(this, 8, value || []);
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {number} value
|
|
* @param {number=} opt_index
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.prototype.addPredictedDurations = function(value, opt_index) {
|
|
return jspb.Message.addToRepeatedField(this, 8, value, opt_index);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the list making it empty but non-null.
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.prototype.clearPredictedDurationsList = function() {
|
|
return this.setPredictedDurationsList([]);
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
/**
|
|
* Creates an object representation of this proto.
|
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
* Optional fields that are not set will be set to undefined.
|
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
* For the list of reserved names please see:
|
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
* JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @return {!Object}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.nvidia.riva.tts.SynthesizeSpeechResponse.toObject(opt_includeInstance, this);
|
|
};
|
|
|
|
|
|
/**
|
|
* Static version of the {@see toObject} method.
|
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
* the JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @param {!proto.nvidia.riva.tts.SynthesizeSpeechResponse} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
audio: msg.getAudio_asB64(),
|
|
meta: (f = msg.getMeta()) && proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.toObject(includeInstance, f)
|
|
};
|
|
|
|
if (includeInstance) {
|
|
obj.$jspbMessageInstance = msg;
|
|
}
|
|
return obj;
|
|
};
|
|
}
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format).
|
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechResponse}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.nvidia.riva.tts.SynthesizeSpeechResponse;
|
|
return proto.nvidia.riva.tts.SynthesizeSpeechResponse.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.nvidia.riva.tts.SynthesizeSpeechResponse} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechResponse}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
case 1:
|
|
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
|
msg.setAudio(value);
|
|
break;
|
|
case 2:
|
|
var value = new proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata;
|
|
reader.readMessage(value,proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.deserializeBinaryFromReader);
|
|
msg.setMeta(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.nvidia.riva.tts.SynthesizeSpeechResponse} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getAudio_asU8();
|
|
if (f.length > 0) {
|
|
writer.writeBytes(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getMeta();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
2,
|
|
f,
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata.serializeBinaryToWriter
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes audio = 1;
|
|
* @return {!(string|Uint8Array)}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse.prototype.getAudio = function() {
|
|
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes audio = 1;
|
|
* This is a type-conversion wrapper around `getAudio()`
|
|
* @return {string}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse.prototype.getAudio_asB64 = function() {
|
|
return /** @type {string} */ (jspb.Message.bytesAsB64(
|
|
this.getAudio()));
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes audio = 1;
|
|
* Note that Uint8Array is not supported on all browsers.
|
|
* @see http://caniuse.com/Uint8Array
|
|
* This is a type-conversion wrapper around `getAudio()`
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse.prototype.getAudio_asU8 = function() {
|
|
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
|
|
this.getAudio()));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!(string|Uint8Array)} value
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechResponse} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse.prototype.setAudio = function(value) {
|
|
return jspb.Message.setProto3BytesField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional SynthesizeSpeechResponseMetadata meta = 2;
|
|
* @return {?proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse.prototype.getMeta = function() {
|
|
return /** @type{?proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata} */ (
|
|
jspb.Message.getWrapperField(this, proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata, 2));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {?proto.nvidia.riva.tts.SynthesizeSpeechResponseMetadata|undefined} value
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechResponse} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse.prototype.setMeta = function(value) {
|
|
return jspb.Message.setWrapperField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the message field making it undefined.
|
|
* @return {!proto.nvidia.riva.tts.SynthesizeSpeechResponse} returns this
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse.prototype.clearMeta = function() {
|
|
return this.setMeta(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {boolean}
|
|
*/
|
|
proto.nvidia.riva.tts.SynthesizeSpeechResponse.prototype.hasMeta = function() {
|
|
return jspb.Message.getField(this, 2) != null;
|
|
};
|
|
|
|
|
|
goog.object.extend(exports, proto.nvidia.riva.tts);
|