Skip to content

feat: add DashScope adapter for Qwen3-ASR real-time speech recognition#3967

Merged
yujonglee merged 10 commits intomainfrom
devin/1771060374-dashscope-adapter
Feb 14, 2026
Merged

feat: add DashScope adapter for Qwen3-ASR real-time speech recognition#3967
yujonglee merged 10 commits intomainfrom
devin/1771060374-dashscope-adapter

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Feb 14, 2026

feat: add DashScope adapter for Qwen3-ASR real-time STT

Summary

Adds a new DashScopeAdapter for Alibaba Cloud's DashScope platform (Model Studio), supporting the Qwen3-ASR real-time speech recognition model via WebSocket. Batch transcription is stubbed as a no-op per request.

DashScope's real-time API uses a WebSocket protocol very similar to OpenAI's Realtime API (same event names like session.created, input_audio_buffer.speech_started, conversation.item.input_audio_transcription.completed), with DashScope-specific differences in the session config structure and a .text event instead of OpenAI's .delta for streaming transcripts.

Provider naming rationale: "DashScope" is the API platform name (like "OpenAI"), while "Qwen3-ASR" is just a model within it. Both the China (dashscope.aliyuncs.com) and International (dashscope-intl.aliyuncs.com) endpoints use the same protocol — the adapter handles both via URL-based region detection, defaulting to International.

Files changed:

  • adapter/dashscope/mod.rsDashScopeAdapter struct, URL building, language support
  • adapter/dashscope/live.rsRealtimeSttAdapter impl (WebSocket session config, audio encoding, response parsing)
  • adapter/dashscope/batch.rs — No-op BatchSttAdapter impl
  • providers.rs — New Provider::DashScope variant with all required provider metadata
  • adapter/mod.rs — New AdapterKind::DashScope, wired into language support and provider mapping
  • lib.rs — Export DashScopeAdapter

Review & Testing Checklist for Human

  • Session update JSON format: The initial_message sends a session.update with modalities, transcription (containing model, language, input_audio_format, input_sample_rate), and turn_detection. This was inferred from the DashScope SDK sample code, but the exact wire format has not been validated against a live connection. The Java SDK wraps this through OmniRealtimeConfig / updateSession() — the actual JSON shape may differ.
  • Finalize message: Uses input_audio_buffer.commit (same as OpenAI). The DashScope SDK sample calls conversation.endSession() which may send a different message (the code comment mentions session.finish). Needs verification.
  • Event name .text vs .delta: DashScope uses conversation.item.input_audio_transcription.text for streaming deltas (vs OpenAI's .delta). Verify this matches real server responses.
  • Domain aliyuncs.com breadth: The domain match will capture all *.aliyuncs.com subdomains (including non-DashScope services like OSS). Consider whether this needs to be narrowed.

Recommended test plan: Connect to wss://dashscope-intl.aliyuncs.com/api-ws/v1/realtime with a valid DASHSCOPE_API_KEY and stream audio to verify the session handshake and transcription events work as expected. The ignored tests in live.rs can be run with cargo test -p owhisper-client -- --ignored test_build_single.

Notes

  • Batch transcription intentionally returns an error — DashScope's FileTrans API requires a publicly accessible file URL rather than direct upload, which doesn't fit the current BatchSttAdapter trait signature.
  • Language support returns NoData quality (same as OpenAI/Fireworks adapters for new integrations).

Link to Devin run: https://app.devin.ai/sessions/87af043c71fa4b2bb3d49717a3235510
Requested by: @yujonglee


Open with Devin

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Feb 14, 2026

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 01d6dd8
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/6990552533bbde0008ba7218
😎 Deploy Preview https://deploy-preview-3967--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Feb 14, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit 01d6dd8
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/69905525128eb30008541bd3

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Copy link
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 3 potential issues.

View 4 additional findings in Devin Review.

Open in Devin Review

…tener2)

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Copy link
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 2 new potential issues.

View 5 additional findings in Devin Review.

Open in Devin Review

devin-ai-integration bot and others added 5 commits February 14, 2026 09:33
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
…sion.finish for finalization

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
…oviders)

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Copy link
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 2 new potential issues.

View 8 additional findings in Devin Review.

Open in Devin Review

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
Copy link
Contributor Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 10 additional findings in Devin Review.

Open in Devin Review

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@yujonglee yujonglee merged commit 1ffb03f into main Feb 14, 2026
25 of 26 checks passed
@yujonglee yujonglee deleted the devin/1771060374-dashscope-adapter branch February 14, 2026 11:06
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.

1 participant