你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Transcriptions - Get

获取由给定 ID 标识的听录。

GET {endpoint}/speechtotext/v3.1/transcriptions/{id}

URI 参数

名称 必需 类型 说明
endpoint
path True

string

支持的认知服务终结点(协议和主机名,例如:https://westus.api.cognitive.microsoft.com)。

id
path True

string (uuid)

听录的标识符。

响应

名称 类型 说明
200 OK

Transcription

还行

标头

Retry-After: integer

Other Status Codes

Error

发生错误。

安全性

Ocp-Apim-Subscription-Key

在此处提供认知服务帐户密钥。

类型: apiKey
在: header

Authorization

提供来自此区域的 STS 返回的 JWT 的访问令牌。 通过将以下查询字符串添加到 STS URL,确保将管理范围添加到令牌: ?scope=speechservicesmanagement

类型: apiKey
在: header

示例

Get a transcription

示例请求

GET {endpoint}/speechtotext/v3.1/transcriptions/ba7ea6f5-3065-40b7-b49a-a90f48584683

示例响应

{
  "self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/transcriptions/ba7ea6f5-3065-40b7-b49a-a90f48584683",
  "model": {
    "self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/models/827712a5-f942-4997-91c3-7c6cde35600b"
  },
  "links": {
    "files": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/transcriptions/ba7ea6f5-3065-40b7-b49a-a90f48584683/files"
  },
  "properties": {
    "diarizationEnabled": false,
    "wordLevelTimestampsEnabled": false,
    "displayFormWordLevelTimestampsEnabled": false,
    "channels": [
      0,
      1
    ],
    "punctuationMode": "DictatedAndAutomatic",
    "profanityFilterMode": "Masked",
    "duration": "PT42S"
  },
  "lastActionDateTime": "2019-01-07T11:36:07Z",
  "status": "Succeeded",
  "createdDateTime": "2019-01-07T11:34:12Z",
  "locale": "en-US",
  "displayName": "Transcription using adapted model en-US",
  "customProperties": {
    "key": "value"
  }
}

定义

名称 说明
DetailedErrorCode

DetailedErrorCode

DiarizationProperties

DiarizationProperties

DiarizationSpeakersProperties

DiarizationSpeakersProperties

EntityError

EntityError

EntityReference

EntityReference

Error

错误

ErrorCode

ErrorCode

InnerError

InnerError

LanguageIdentificationProperties

LanguageIdentificationProperties

ProfanityFilterMode

ProfanityFilterMode

PunctuationMode

标点符号Mode

Status

状态

Transcription

转录

TranscriptionLinks

TranscriptionLinks

TranscriptionProperties

TranscriptionProperties

DetailedErrorCode

DetailedErrorCode

说明
DataImportFailed

数据导入失败。

DeleteNotAllowed

不允许删除。

DeployNotAllowed

不允许部署。

DeployingFailedModel

部署失败的模型。

EmptyRequest

空请求。

EndpointCannotBeDefault

终结点不能为默认值。

EndpointNotUpdatable

终结点不可更新。

EndpointWithoutLogging

没有日志记录的终结点。

ExceededNumberOfRecordingsUris

超过录制 URI 数。

FailedDataset

失败的数据集。

Forbidden

禁止。

InUseViolation

在使用冲突中。

InaccessibleCustomerStorage

无法访问客户存储。

InvalidAdaptationMapping

适应映射无效。

InvalidBaseModel

基本模型无效。

InvalidCallbackUri

回调 URI 无效。

InvalidCollection

集合无效。

InvalidDataset

数据集无效。

InvalidDocument

无效的文档。

InvalidDocumentBatch

文档批处理无效。

InvalidLocale

区域设置无效。

InvalidLogDate

日志日期无效。

InvalidLogEndTime

日志结束时间无效。

InvalidLogId

无效的日志 ID。

InvalidLogStartTime

无效的日志开始时间。

InvalidModel

无效的模型。

InvalidModelUri

模型 URI 无效。

InvalidParameter

参数无效。

InvalidParameterValue

参数值无效。

InvalidPayload

有效负载无效。

InvalidPermissions

权限无效。

InvalidPrerequisite

先决条件无效。

InvalidProductId

产品 ID 无效。

InvalidProject

项目无效。

InvalidProjectKind

项目类型无效。

InvalidRecordingsUri

录制 URI 无效。

InvalidRequestBodyFormat

请求正文格式无效。

InvalidSasValidityDuration

SAS 有效期无效。

InvalidSkipTokenForLogs

日志的跳过令牌无效。

InvalidSubscription

订阅无效。

InvalidTest

测试无效。

InvalidTimeToLive

生存时间无效。

InvalidTopForLogs

日志顶部无效。

InvalidTranscription

听录无效。

InvalidWebHookEventKind

Web 挂钩事件类型无效。

MissingInputRecords

缺少输入记录。

ModelDeploymentNotCompleteState

模型部署未完成状态。

ModelDeprecated

模型已弃用。

ModelExists

模型存在。

ModelMismatch

模型不匹配。

ModelNotDeployable

模型不可部署。

ModelVersionIncorrect

模型版本不正确。

NoUtf8WithBom

没有带有 bom 的 utf8。

OnlyOneOfUrlsOrContainerOrDataset

只有一个 URL 或容器或数据集。

ProjectGenderMismatch

项目性别不匹配。

QuotaViolation

配额冲突。

SingleDefaultEndpoint

单个默认终结点。

SkuLimitsExist

SKU 限制存在。

SubscriptionNotFound

找不到订阅。

UnexpectedError

意外错误。

UnsupportedClassBasedAdaptation

不支持的基于类的适应。

UnsupportedDelta

不支持的增量。

UnsupportedDynamicConfiguration

不支持的动态配置。

UnsupportedFilter

不支持的筛选器。

UnsupportedLanguageCode

不支持的语言代码。

UnsupportedOrderBy

不受支持的订单依据。

UnsupportedPagination

不支持的分页。

UnsupportedTimeRange

不支持的时间范围。

DiarizationProperties

DiarizationProperties

名称 类型 说明
speakers

DiarizationSpeakersProperties

DiarizationSpeakersProperties

DiarizationSpeakersProperties

DiarizationSpeakersProperties

名称 类型 说明
maxCount

integer (int32)

minimum: 1

用于分割的最大说话人数。 必须小于 36 且大于或等于 minSpeakers 属性。

minCount

integer (int32)

minimum: 1

用于分割的最小扬声器数的提示。 必须小于或等于 maxSpeakers 属性。

EntityError

EntityError

名称 类型 说明
code

string

此错误的代码。

message

string

此错误的消息。

EntityReference

EntityReference

名称 类型 说明
self

string (uri)

引用实体的位置。

Error

错误

名称 类型 说明
code

ErrorCode

ErrorCode
高级错误代码。

details

Error[]

有关错误和/或预期策略的其他支持详细信息。

innerError

InnerError

InnerError
符合认知服务 API 准则的新内部错误格式,可在 https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow获取。 这包括必需的属性 ErrorCode、消息和可选属性目标、详细信息(键值对)、内部错误(可嵌套)。

message

string

高级错误消息。

target

string

错误的源。 例如,如果文档无效,则为“documents”或“document id”。

ErrorCode

ErrorCode

说明
Conflict

表示冲突错误代码。

Forbidden

表示禁止的错误代码。

InternalCommunicationFailed

表示内部通信失败的错误代码。

InternalServerError

表示内部服务器错误代码。

InvalidArgument

表示无效的参数错误代码。

InvalidRequest

表示无效的请求错误代码。

NotAllowed

表示不允许的错误代码。

NotFound

表示找不到的错误代码。

PipelineError

表示管道错误代码。

ServiceUnavailable

表示服务不可用的错误代码。

TooManyRequests

表示请求错误代码过多。

Unauthorized

表示未经授权的错误代码。

UnprocessableEntity

表示无法处理的实体错误代码。

UnsupportedMediaType

表示不支持的媒体类型错误代码。

InnerError

InnerError

名称 类型 说明
code

DetailedErrorCode

DetailedErrorCode
详细的错误代码枚举。

details

object

有关错误和/或预期策略的其他支持详细信息。

innerError

InnerError

InnerError
符合认知服务 API 准则的新内部错误格式,可在 https://microsoft.sharepoint.com/%3Aw%3A/t/CognitiveServicesPMO/EUoytcrjuJdKpeOKIK_QRC8BPtUYQpKBi8JsWyeDMRsWlQ?e=CPq8ow获取。 这包括必需的属性 ErrorCode、消息和可选属性目标、详细信息(键值对)、内部错误(可嵌套)。

message

string

高级错误消息。

target

string

错误的源。 例如,如果文档无效,则为“documents”或“document id”。

LanguageIdentificationProperties

LanguageIdentificationProperties

名称 类型 说明
candidateLocales

string[]

语言标识的候选区域设置(例如 [“en-US”, “de-DE”, “es-ES”]) 。 至少支持 2 个和最多 10 个候选区域设置,包括听录的主要区域设置。

speechModelMapping

<string,  EntityReference>

区域设置到语音模型实体的可选映射。 如果未为区域设置提供模型,则使用默认基础模型。 键必须是候选区域设置中包含的区域设置,值是相应区域设置模型的实体。

ProfanityFilterMode

ProfanityFilterMode

说明
Masked

用 * 屏蔽不雅内容,但第一个字母除外,例如 f***

None

禁用不雅内容筛选。

Removed

删除不雅内容。

Tags

</不雅内容> 添加“不雅内容”XML 标记

PunctuationMode

标点符号Mode

说明
Automatic

自动标点符号。

Dictated

仅听写标点符号,即显式标点符号。

DictatedAndAutomatic

听写标点符号或自动标点符号。

None

无标点符号。

Status

状态

说明
Failed

长时间运行的作失败。

NotStarted

长时间运行的作尚未启动。

Running

长时间运行的作当前正在处理。

Succeeded

长时间运行的作已成功完成。

Transcription

转录

名称 类型 说明
contentContainerUrl

string (uri)

包含音频文件的 Azure Blob 容器的 URL。 允许容器的最大大小为 5GB,最大大小为 10000 个 blob。 Blob 的最大大小为 2.5GB。 容器 SAS 应包含“r”(读取)和“l”(列表)权限。 此属性不会在响应中返回。

contentUrls

string[] (uri)

用于获取要转录的音频文件的内容 URL 列表。 最多允许 1000 个 URL。 此属性不会在响应中返回。

createdDateTime

string (date-time)

创建对象的时间戳。 时间戳编码为 ISO 8601 日期和时间格式(“YYYY-MM-DDThh:mm:ssZ”,请参阅 https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations)。

customProperties

object

此实体的自定义属性。 允许的最大密钥长度为 64 个字符,允许的最大值长度为 256 个字符,允许的条目计数为 10。

dataset

EntityReference

EntityReference

description

string

对象的说明。

displayName

string

minLength: 1

对象的显示名称。

lastActionDateTime

string (date-time)

输入当前状态时的时间戳。 时间戳编码为 ISO 8601 日期和时间格式(“YYYY-MM-DDThh:mm:ssZ”,请参阅 https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations)。

links

TranscriptionLinks

TranscriptionLinks

locale

string

minLength: 1

包含数据的区域设置。 如果使用语言标识,则此区域设置用于转录无法检测到任何语言的语音。

model

EntityReference

EntityReference

project

EntityReference

EntityReference

properties

TranscriptionProperties

TranscriptionProperties

self

string (uri)

此实体的位置。

status

Status

状态
描述 API 的当前状态

TranscriptionLinks

名称 类型 说明
files

string (uri)

获取此实体的所有文件的位置。 有关详细信息,请参阅作“Transcriptions_ListFiles”。

TranscriptionProperties

TranscriptionProperties

名称 类型 说明
channels

integer[] (int32)

请求的通道编号的集合。 在默认情况下,将考虑通道 0 和 1。

destinationContainerUrl

string (uri)

请求的目标容器。

注解

当目标容器与 timeToLive结合使用时,将正常删除听录的元数据,但目标容器中存储的数据(包括听录结果)将保持不变,因为此容器不需要删除权限。
若要支持自动清理,请在容器上配置 Blob 生存期,或使用“自带存储(BYOS)”,而不是 destinationContainerUrl,可在其中清理 blob。

diarization

DiarizationProperties

DiarizationProperties

diarizationEnabled

boolean

一个值,该值指示是否请求分割(说话人识别)。 默认值是 false。 如果此字段设置为 true,并且通过指定 DiarizationProperties来配置改进的分割系统,则改进的分割系统将为可配置的扬声器范围提供分割。 如果此字段设置为 true 且未启用改进的分割系统(未指定 DiarizationProperties),则基本分割系统将区分最多两个扬声器。 基本分割不收取额外的费用。

基本分割系统已弃用,将在下一个主要版本的 API 中删除。 此 diarizationEnabled 设置也将被删除。

displayFormWordLevelTimestampsEnabled

boolean

一个值,该值指示是否请求显示窗体的字级时间戳。 默认值是 false

duration

string

听录的持续时间。 持续时间编码为 ISO 8601 持续时间(“PnYnMnDTnHnMnS”,请参阅 https://en.wikipedia.org/wiki/ISO_8601#Durations)。

email

string

要发送电子邮件通知的电子邮件地址,以防作完成。 成功发送电子邮件后,将删除该值。

error

EntityError

EntityError

languageIdentification

LanguageIdentificationProperties

LanguageIdentificationProperties

profanityFilterMode

ProfanityFilterMode

ProfanityFilterMode
不雅内容筛选模式。

punctuationMode

PunctuationMode

标点符号Mode
用于标点的模式。

timeToLive

string

听录将在系统完成后保留多长时间。 一旦听录到达完成后生存时间(成功或失败),它将自动删除。 不设置此值或将其设置为 0 将禁用自动删除。 最长支持的持续时间为 31 天。 持续时间编码为 ISO 8601 持续时间(“PnYnMnDTnHnMnS”,请参阅 https://en.wikipedia.org/wiki/ISO_8601#Durations)。

wordLevelTimestampsEnabled

boolean

一个值,该值指示是否请求字级时间戳。 默认值是 false