/* Options: Date: 2025-05-12 19:42:35 Version: 8.53 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://test.servicestack.net //GlobalNamespace: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: SpeechToText.* //ExcludeTypes: //DefaultImports: package:servicestack/servicestack.dart,dart:typed_data,dart:collection */ import 'package:servicestack/servicestack.dart'; import 'dart:typed_data'; import 'dart:collection'; abstract class IGeneration { String? refId; String? tag; } /** * Output object for generated text */ class TextOutput implements IConvertible { /** * The generated text */ // @ApiMember(Description="The generated text") String? text; TextOutput({this.text}); TextOutput.fromJson(Map json) { fromMap(json); } fromMap(Map json) { text = json['text']; return this; } Map toJson() => { 'text': text }; getTypeName() => "TextOutput"; TypeContext? context = _ctx; } /** * Response object for text generation requests */ // @Api(Description="Response object for text generation requests") class TextGenerationResponse implements IConvertible { /** * List of generated text outputs */ // @ApiMember(Description="List of generated text outputs") List? results; /** * Detailed response status information */ // @ApiMember(Description="Detailed response status information") ResponseStatus? responseStatus; TextGenerationResponse({this.results,this.responseStatus}); TextGenerationResponse.fromJson(Map json) { fromMap(json); } fromMap(Map json) { results = JsonConverters.fromJson(json['results'],'List',context!); responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!); return this; } Map toJson() => { 'results': JsonConverters.toJson(results,'List',context!), 'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!) }; getTypeName() => "TextGenerationResponse"; TypeContext? context = _ctx; } /** * Convert speech to text */ // @Api(Description="Convert speech to text") class SpeechToText implements IReturn, IGeneration, IConvertible, IPost { /** * The audio stream containing the speech to be transcribed */ // @ApiMember(Description="The audio stream containing the speech to be transcribed") // @required() String? audio; /** * Optional client-provided identifier for the request */ // @ApiMember(Description="Optional client-provided identifier for the request") String? refId; /** * Tag to identify the request */ // @ApiMember(Description="Tag to identify the request") String? tag; SpeechToText({this.audio,this.refId,this.tag}); SpeechToText.fromJson(Map json) { fromMap(json); } fromMap(Map json) { audio = json['audio']; refId = json['refId']; tag = json['tag']; return this; } Map toJson() => { 'audio': audio, 'refId': refId, 'tag': tag }; createResponse() => TextGenerationResponse(); getResponseTypeName() => "TextGenerationResponse"; getTypeName() => "SpeechToText"; TypeContext? context = _ctx; } TypeContext _ctx = TypeContext(library: 'test.servicestack.net', types: { 'IGeneration': TypeInfo(TypeOf.Interface), 'TextOutput': TypeInfo(TypeOf.Class, create:() => TextOutput()), 'TextGenerationResponse': TypeInfo(TypeOf.Class, create:() => TextGenerationResponse()), 'List': TypeInfo(TypeOf.Class, create:() => []), 'SpeechToText': TypeInfo(TypeOf.Class, create:() => SpeechToText()), });