generate method

String generate(
  1. String optsJson
)

Generate speech audio from optsJson (serialized SpeechCallOptions).

Returns the JSON-serialized SpeechResult, or throws on error.

Implementation

String generate(String optsJson) {
  _checkOpen();
  return _withUtf8(optsJson, (optsPtr) {
    final resultPtr = _ffi.speechGenerate(_handle, optsPtr);
    return _readResult(_ffi, resultPtr);
  });
}