xfyun-sdk Roadmap
This document tracks planned features that are not yet implemented in the current release.
🚧 Items listed here are user-facing commitments, not guarantees. They represent intended direction. ETA is omitted to avoid implying a release date that may slip.
🚧 Planned (Not Yet Implemented)
WeChat Mini Program Support
Status: Not implemented Effort estimate: ~3-5 days Why deferred: WebSocket + MediaRecorder APIs in mini-program environment differ significantly from browser (uses wx.connectSocket + RecorderManager). Requires a parallel adapter layer in src/platforms/miniprogram/.
What it would entail:
PlatformAdapterinterface abstraction in core (currently hardcoded to browser globals)BrowserAdapter(current implementation) +MiniProgramAdapter(new)- WebSocket polyfill using
wx.connectSocket(signature-compatible with browser WebSocket) - Audio capture using
wx.getRecorderManager()instead ofMediaRecorder - Audio playback using
wx.createInnerAudioContext()instead of HTMLAudioElement - Build pipeline: separate rollup config for mini-program output (CommonJS only, no UMD)
Current alternative: Users targeting mini-program can use the core classes (XfyunASR / XfyunTTS / XfyunTranslator) if they provide a WebSocket-compatible transport. The recording and audio playback parts still require mini-program-specific adapters.
Vue 3 Composable Distribution
Status: Examples provided, no published package Effort estimate: ~1 day
The Vue composables (useSpeechRecognizer, useSpeechSynthesizer, useTranslator) live in examples/vue-demo/src/composables/. They are functional and tested manually, but:
- Not published to npm
- No version pinning (changes with the SDK may break them)
- No separate test coverage
Future plan: Either (a) move them to a separate xfyun-sdk-vue package, or (b) document them as copy-paste patterns with stability guarantees. Decision deferred to user feedback.
TTS Audio Playback Helper
Status: Not implemented Effort estimate: ~0.5 day
Currently SpeechSynthesizer returns audio chunks via onAudioData callback. Users have to wire up their own <audio> element / Audio() instance to play.
A built-in playAudio() method (or auto-play option) on XfyunTTS would streamline the most common use case. Tradeoff: locks the SDK to browser Audio API (which already works fine).
Stable Major Version (v2.0.0)
Status: Blocked on error code migration completion Target: After one release cycle with legacyCode field
v2.0 will:
- Remove
legacyCodefield (breaking change completion) - Remove
XFUN_ERROR_CODESalias (useXFUN_SERVER_ERROR_CODESonly) - Tighten
Translator.tsx domaintype to union type - Drop Node.js 14 / 16 support (target Node 18+)
✅ Recently Shipped
See changelog.md for the full history.