/** * STT(语音转文字)响应 * 原始 Dart: SttData (lib/data/models/chat/stt_response.dart) */ export class SttData { readonly text: string; constructor(params: { text: string }) { this.text = params.text; Object.freeze(this); } toJson(): Record { return { text: this.text }; } static fromJson(json: Record): SttData { const text = json.text; if (typeof text !== "string") { throw new Error("SttData.text is required and must be a string"); } return new SttData({ text }); } }