"use strict";
export class TextOutput {
/** @param {{text?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {?string}
* @description The generated text */
text;
}
export class TextGenerationResponse {
/** @param {{results?:TextOutput[],responseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {?TextOutput[]}
* @description List of generated text outputs */
results;
/**
* @type {?ResponseStatus}
* @description Detailed response status information */
responseStatus;
}
export class SpeechToText {
/** @param {{audio?:string,refId?:string,tag?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description The audio stream containing the speech to be transcribed */
audio;
/**
* @type {?string}
* @description Optional client-provided identifier for the request */
refId;
/**
* @type {?string}
* @description Tag to identify the request */
tag;
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /csv/reply/SpeechToText HTTP/1.1
Host: test.servicestack.net
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"audio":"String","refId":"String","tag":"String"}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"results":[{"text":"String"}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}