Skip to content

feat: 非实时语音识别与热词管理 API (#1) - #211

Closed
andywu188 wants to merge 2 commits into
cnblogs:mainfrom
andywu188:main
Closed

andywu188 wants to merge 2 commits into
cnblogs:mainfrom
andywu188:main

Conversation

@andywu188

@andywu188 andywu188 commented Sep 19, 2026 •

Copy link
Copy Markdown
  • feat: add non-realtime speech recognition and vocabulary APIs

Add DashScope ASR support for asynchronous file transcription (Paraformer/Fun-ASR), Fun-ASR-Flash sync/SSE recognition, and speech-biasing vocabulary CRUD, with samples, tests, and docs.

andywu188 and others added 2 commits September 20, 2026 01:47
* feat: add non-realtime speech recognition and vocabulary APIs

Add DashScope ASR support for asynchronous file transcription
(Paraformer/Fun-ASR), Fun-ASR-Flash sync/SSE recognition, and
speech-biasing vocabulary CRUD, with samples, tests, and docs.

Co-authored-by: Andy Wu <andywu188@users.noreply.github.com>

* fix: use real Fun-ASR-Flash model id in samples and docs

fun-asr-flash is not a valid DashScope model name; switch samples,
README, and snapshots to fun-asr-flash-2026-06-15.

Co-authored-by: Andy Wu <andywu188@users.noreply.github.com>

* docs: document non-realtime ASR models and regions

Add the official Bailian model/region matrix to README, including
Qwen3 ASR variants and regional availability differences.

Co-authored-by: Andy Wu <andywu188@users.noreply.github.com>

* docs: split ASR model docs between EN and ZH READMEs

Keep English link text in README.md and add the full speech
recognition section to README.zh-Hans.md.

Co-authored-by: Andy Wu <andywu188@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Andy Wu <andywu188@users.noreply.github.com>
* feat: add LingQue CCAI Conversation Analysis AIO client

Introduce an independent ContactCenterAI client with ACS3-HMAC-SHA256
signing for AnalyzeConversation, RunCompletion, CreateTask, and
GetTaskResult, plus factory helpers and unit tests for the official
summary, field-extraction, and service-inspection best practices.
Copilot AI lite review requested due to automatic review settings September 19, 2026 19:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

One or more issues must be addressed before approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity · 1 Medium severity

Open (3)
What changed in this PR

Adds speech transcription, Flash recognition, speech vocabulary CRUD, and a separate ACS3 ContactCenterAI client with tests, samples, and documentation.

Changes:

  • Added speech models and DashScope APIs.
  • Added ContactCenterAI client, signing, models, DI integration, and tests.
  • Added samples, snapshots, raw HTTP fixtures, and README documentation.
File Description
test/​Cnblogs.DashScope.Tests.Shared/​Utils/​Snapshots.Speech.cs Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-update-nosse.response.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-update-nosse.response.body.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-update-nosse.request.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-update-nosse.request.body.json Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-query-nosse.response.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-query-nosse.response.body.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-query-nosse.request.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-query-nosse.request.body.json Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-list-nosse.response.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-list-nosse.response.body.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-list-nosse.request.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-list-nosse.request.body.json Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-delete-nosse.response.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-delete-nosse.response.body.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-delete-nosse.request.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-delete-nosse.request.body.json Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-create-nosse.response.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-create-nosse.response.body.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-create-nosse.request.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-vocabulary-create-nosse.request.body.json Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-transcription-result-nosse.response.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-transcription-result-nosse.response.body.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-transcription-result-nosse.request.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-transcription-result-nosse.request.body.json Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-transcription-get-task-nosse.response.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-transcription-get-task-nosse.response.body.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-transcription-get-task-nosse.request.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-transcription-get-task-nosse.request.body.json Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-transcription-create-oss-nosse.response.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-transcription-create-oss-nosse.response.body.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-transcription-create-oss-nosse.request.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-transcription-create-oss-nosse.request.body.json Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-transcription-create-nosse.response.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-transcription-create-nosse.response.body.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-transcription-create-nosse.request.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-transcription-create-nosse.request.body.json Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-recognition-flash-sse.response.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-recognition-flash-sse.response.body.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-recognition-flash-sse.request.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-recognition-flash-sse.request.body.json Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-recognition-flash-nosse.response.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-recognition-flash-nosse.response.body.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-recognition-flash-nosse.request.header.txt Updated as part of this pull request.
test/​Cnblogs.DashScope.Tests.Shared/​RawHttpData/​speech-recognition-flash-nosse.request.body.json Updated as part of this pull request.
test/​Cnblogs.DashScope.Sdk.UnitTests/​SpeechVocabularySerializationTests.cs Updated as part of this pull request.
test/​Cnblogs.DashScope.Sdk.UnitTests/​SpeechTranscriptionSerializationTests.cs Updated as part of this pull request.
test/​Cnblogs.DashScope.Sdk.UnitTests/​SpeechRecognitionSerializationTests.cs Updated as part of this pull request.
test/​Cnblogs.DashScope.Sdk.UnitTests/​ContactCenterAiClientTests.cs Updated as part of this pull request.
test/​Cnblogs.DashScope.Sdk.UnitTests/​Acs3SignerTests.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechVocabularyOutput.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechVocabularyModels.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechVocabularyItem.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechVocabularyInput.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechTranscriptionUsage.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechTranscriptionSubtaskResult.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechTranscriptionParameters.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechTranscriptionOutput.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechTranscriptionInput.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechTranscriptionFileResult.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechTranscriptionContextMessage.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechTranscriptionContextContent.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechRecognitionParameters.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechRecognitionOutput.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechRecognitionMessageContent.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechRecognitionMessage.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​SpeechRecognitionInput.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​ISpeechTranscriptionParameters.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​ISpeechRecognitionParameters.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​Internals/​ContactCenterAiDefaults.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​Internals/​ContactCenterAiApiLinks.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​Internals/​ApiLinks.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​Internals/​Acs3Signer.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​IDashScopeClient.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​IContactCenterAiClient.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​DashScopeClientCore.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​ContactCenterAiOptions.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​ContactCenterAiException.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​ContactCenterAiClient.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiWordWeight.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiUserProfile.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiServiceInspection.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiSentence.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiRunCompletionRequest.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiRunCompletionMessageRequest.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiResultTypes.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiInspectionContent.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiImageResultTypes.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiGetTaskResultResponse.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiFieldEnumValue.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiField.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiExample.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiDialogue.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiCreateTaskRequest.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiCategoryTag.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​CcaiAnalyzeImageRequest.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​AnalyzeConversationResponse.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.Core/​AnalyzeConversationRequest.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.AspNetCore/​DashScopeAspNetCoreDefaults.cs Updated as part of this pull request.
src/​Cnblogs.DashScope.AspNetCore/​ContactCenterAiServiceCollectionExtensions.cs Updated as part of this pull request.
sample/​Cnblogs.DashScope.Sample/​SpeechSample.cs Updated as part of this pull request.
sample/​Cnblogs.DashScope.Sample/​Speech/​SpeechVocabularySample.cs Updated as part of this pull request.
sample/​Cnblogs.DashScope.Sample/​Speech/​SpeechTranscriptionSample.cs Updated as part of this pull request.
sample/​Cnblogs.DashScope.Sample/​Speech/​SpeechRecognitionFlashSample.cs Updated as part of this pull request.
README.zh-Hans.md Updated as part of this pull request.
README.md Updated as part of this pull request.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

/// Template ids. Takes precedence over resultTypes when both are present.
/// </summary>
[JsonPropertyName("templateIds")]
public List<string>? TemplateIds { get; set; }
Comment on lines +137 to +142
public async Task<SpeechTranscriptionFileResult> GetSpeechTranscriptionResultAsync(
string transcriptionUrl,
CancellationToken cancellationToken = default)
{
var request = BuildRequest(HttpMethod.Get, transcriptionUrl);
return (await SendAsync<SpeechTranscriptionFileResult>(request, cancellationToken))!;
Comment on lines +534 to +537
catch (Exception ex)
{
throw new ContactCenterAiException(message.RequestUri?.ToString(), 0, null, null, null, ex.Message);
}
@andywu188 andywu188 closed this Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants