CreatePlatformSpeechToTextProviderOptions
This content is not available in your language yet.
createPlatformSpeechToTextProvider 的材料:公共网关材料 + 授权 ASR 模型集
audience?
Section titled “audience?”optional audience?: MediaHintAudience;错误 hint 受众档——'app'(缺省;sdk 令牌档 / serve 平台内置形:App 开发者口径)/
'user'(cli 登录态装置键径:钱包 / 平台管理员口径,恒不出现「app developer」)。单源表 media-hints.ts hintFor。
PlatformMediaProviderOptions.audience
baseUrl
Section titled “baseUrl”baseUrl: string;平台 API 基址(/t1 前缀由本提供方追加)。
PlatformMediaProviderOptions.baseUrl
fetchImpl?
Section titled “fetchImpl?”optional fetchImpl?: any;fetch 注入缝(测试桩网关;缺省全局 fetch)。
PlatformMediaProviderOptions.fetchImpl
hintOf?
Section titled “hintOf?”optional hintOf?: (code) => string | undefined;hint 覆写缝——按码返回指引即用之('' = 显式无指引);返回 undefined 回落单源表;表外仍 undefined
→ kernel 通用指引。宿主(cli 活性门 / 自建提供方)按需覆写个别码,不必复制整表。
string
string | undefined
PlatformMediaProviderOptions.hintOf
models?
Section titled “models?”optional models?: readonly SpeechToTextModelDescriptor[];授权 ASR 模型集(bundle platformModels.speechToText,装配循环自取):骨架描述自列(顺位第一 = model 缺省生效模型),constraints 在场时逐模型拼受理约束注记(格式/时长帽/语种/说话人分离); 空数组 = 平台未配置(如实注明,恒不猜名);缺席 = 集未知,描述回落通用指引。
timeoutMs?
Section titled “timeoutMs?”optional timeoutMs?: number;客户端预算(毫秒;= 工具声明 timeoutMs,薄封装同源传入):任务径内扣安全余量得轮询截止,
恒先于骨架超时返回 task_pending 携 taskId。缺省各面 *_TOOL_TIMEOUT_MS。
PlatformMediaProviderOptions.timeoutMs
token?
Section titled “token?”optional token?: string;app_user 短期令牌(只活在本闭包,恒不进工具定义/日志)。缺席 = 不发 x-tansr-app-token 头,
鉴权由注入的 fetchImpl 承载(cli 装置键径:tansrFetch 双头 + /t1 签名三头)。
PlatformMediaProviderOptions.token
Was this page helpful?
Thanks for your feedback.