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

Models - List Files

获取由给定 ID 标识的模型的文件。

GET {endpoint}/speechtotext/v3.1/models/{id}/files
GET {endpoint}/speechtotext/v3.1/models/{id}/files?sasValidityInSeconds={sasValidityInSeconds}&skip={skip}&top={top}&filter={filter}

URI 参数

名称 必需 类型 说明
endpoint
path True

string

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

id
path True

string (uuid)

模型的标识符。

filter
query

string

用于选择可用文件的子集的筛选表达式。

        - Supported properties: name, createdDateTime, kind.

        - Operators:

          - eq, ne are supported for all properties.

          - gt, ge, lt, le are supported for createdDateTime.

          - and, or, not are supported.

        - Example:

          filter=name eq 'myaudio.wav' and kind eq 'Audio'
sasValidityInSeconds
query

integer (int32)

SAS URL 应有效的持续时间(以秒为单位)。 默认持续时间为 12 小时。 使用 BYOS 时(https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-encryption-of-data-at-rest#bring-your-own-storage-byos-for-customization-and-logging):值为 0 表示将生成不带 SAS 令牌的纯 Blob URI。

skip
query

integer (int32)

将跳过的数据集数。

top
query

integer (int32)

跳过后将包含的数据集数。

响应

名称 类型 说明
200 OK

PaginatedFiles

还行

标头

Retry-After: integer

Other Status Codes

Error

发生错误。

安全性

Ocp-Apim-Subscription-Key

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

类型: apiKey
在: header

Authorization

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

类型: apiKey
在: header

示例

Get all files

示例请求

GET {endpoint}/speechtotext/v3.1/models/827712a5-f942-4997-91c3-7c6cde35600b/files?sasValidityInSeconds=120&skip=0&top=2&filter=createdDateTime%20ge%202018-01-24T09:54:39Z

示例响应

{
  "values": [
    {
      "self": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/models/827712a5-f942-4997-91c3-7c6cde35600b/files/ee4733cd-b1a7-4813-87e2-00d582c28a29",
      "name": "report.json",
      "kind": "ModelReport",
      "properties": {
        "size": 200
      },
      "createdDateTime": "2020-01-13T08:00:00Z",
      "links": {
        "contentUrl": "https://customspeech-usw.blob.core.windows.net/artifacts/report.json?st=2018-02-09T18%3A07%3A00Z&se=2018-02-10T18%3A07%3A00Z&sp=rl&sv=2017-04-17&sr=b&sig=e05d8d56-9675-448b-820c-4318ae64c8d5"
      }
    }
  ],
  "@nextLink": "https://westus.api.cognitive.microsoft.com/speechtotext/v3.1/models/827712a5-f942-4997-91c3-7c6cde35600b/files?skip=2&top=2&filter=createdDateTime%20ge%202018-01-24T09:54:39Z"
}

定义

名称 说明
DetailedErrorCode

DetailedErrorCode

Error

错误

ErrorCode

ErrorCode

File

文件

FileKind

FileKind

FileLinks

FileLinks

FileProperties

FileProperties

InnerError

InnerError

PaginatedFiles

PaginatedFiles

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

不支持的时间范围。

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

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

File

文件

名称 类型 说明
createdDateTime

string (date-time)

此文件的创建时间。 时间戳编码为 ISO 8601 日期和时间格式(请参阅 https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations)。

kind

FileKind

FileKind
数据类型。

links

FileLinks

FileLinks

name

string

此文件的名称。

properties

FileProperties

FileProperties

self

string (uri)

此实体的位置。

FileKind

FileKind

说明
AcousticDataArchive

数据类型是声学数据存档。

AcousticDataTranscriptionV2

数据类型是声学数据听录 v2。

Audio

数据类型为音频。

DatasetReport

数据类型是数据集报表。

EvaluationDetails

数据类型是评估详细信息。

LanguageData

数据类型是语言数据。

ModelReport

数据类型是模型报表。

PronunciationData

数据类型是发音数据。

Transcription

数据类型是听录。

TranscriptionReport

数据类型是听录报告。

FileLinks

名称 类型 说明
contentUrl

string (uri)

要检索此文件的内容的 URL。

FileProperties

FileProperties

名称 类型 说明
duration

string

如果此文件是音频文件,则持续时间。 持续时间编码为 ISO 8601 持续时间(“PnYnMnDTnHnMnS”,请参阅 https://en.wikipedia.org/wiki/ISO_8601#Durations)。

size

integer (int64)

数据的大小(以字节为单位)。

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”。

PaginatedFiles

PaginatedFiles

名称 类型 说明
@nextLink

string (uri)

如果有更多实体可用,则指向下一组分页结果的链接;否则为 null。

values

File[]

受传递的查询参数“skip”和“top”或其默认值限制的实体列表。

使用分页和并行删除实体循环访问列表时,将在结果中跳过某些实体。 建议在客户端上生成列表,并在提取完整列表后将其删除。