@fruitbars/xfyun-ai-mcp 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +10 -4
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -6,7 +6,7 @@ Cross-platform `npx` launcher for the `xfyun-ai-mcp` stdio MCP server.
6
6
  npx -y @fruitbars/xfyun-ai-mcp@latest --version
7
7
  ```
8
8
 
9
- The launcher selects an npm optional dependency for Windows, macOS, or Linux on x64/arm64 and starts the native Go server with inherited stdio and environment variables. It exposes six tools: `xfyun_ocr`, `xfyun_tts`, `xfyun_rtasr`, `xfyun_ifasr_submit`, `xfyun_ifasr_result`, and `xfyun_media`.
9
+ The launcher selects an npm optional dependency for Windows, macOS, or Linux on x64/arm64 and starts the native Go server with inherited stdio and environment variables. It exposes six tools: `xfyun_ocr`, `xfyun_tts` (XFYun super-smart large-model synthesis), `xfyun_rtasr`, `xfyun_ifasr_submit`, `xfyun_ifasr_result`, and `xfyun_media`.
10
10
 
11
11
  Configure `XFYUN_APP_ID`, `XFYUN_API_KEY`, and `XFYUN_API_SECRET` from the same XFYun application in the MCP host. There is no separate fourth IFASR credential. Restart the host after changing its environment; an already-running MCP process cannot inherit later shell changes.
12
12
 
@@ -28,19 +28,25 @@ The optional media helper is passed to the native server automatically. TTS text
28
28
 
29
29
  ## Recording transcription (IFASR)
30
30
 
31
- Use IFASR for completed `mp3`, `wav`, `pcm`, `opus`, `flac`, `ogg`, or `speex` recordings. Submit a local path with `xfyun_ifasr_submit`, then preserve both `order_id` and `signature_random` and pass them to `xfyun_ifasr_result`. A split submission returns `parts`; preserve every part and pass the ordered references as `orders` so the result tool can merge them.
31
+ Use IFASR for completed recordings. The default `variant="llm"` selects XFYun's Spark large-model recording transcription; set `variant="standard"` for the standard recording transcription API. The large-model variant supports `mp3`, `wav`, `pcm`, `opus`, `flac`, `ogg`, and `speex`; standard also accepts the official `aac`, `m4a`, `amr`, `ac3`, `ape`, `m4r`, `mp4`, `acc`, and `wma` formats. Submit a local path with `xfyun_ifasr_submit`. Large-model orders return `order_id` plus `signature_random`; standard orders return only `order_id`. A split submission returns `parts`; preserve every part and pass the ordered references as `orders` so the result tool can merge them.
32
32
 
33
- The submit tool accepts either local `input_path`, or `audio_url` together with `file_name` and `file_size_bytes` for XFYun `urlLink` mode. Oversized local files are split automatically; remote URLs must already fit one 5-hour/500-MiB order. `track_mode=2` enables stereo channel separation and cannot be combined with speaker-role separation or language analysis.
33
+ The submit tool accepts either local `input_path`, or `audio_url` together with `file_name` and `file_size_bytes` for XFYun `urlLink` mode. Oversized local files are split automatically; remote URLs must already fit one 5-hour/500-MiB order. `track_mode=2` enables stereo channel separation and cannot be combined with speaker-role separation or language analysis. Standard uses `appId + ts + signa` and maps `XFYUN_API_SECRET` to the service's `secretkey`; it does not use `signature_random`.
34
34
 
35
35
  Status `0` means created, `3` processing, `4` complete, and `-1` failed. Use `wait=false` for one status check when the MCP host has a short timeout. For batches, save each order reference immediately after submission so an interrupted run can resume without a duplicate upload.
36
36
 
37
+ Hosts that provide an MCP progress token receive progress notifications for TTS segments and IFASR part submission/polling. Hosts without progress support should use the returned output paths, `wait=false`, and saved order references to resume long work safely.
38
+
37
39
  Set `include_raw=true` when speaker IDs, word timing, stereo `label.rl_track`, or other detailed fields are needed. `raw_result` contains `orderResult`; `raw_response` preserves the complete service response, including reserved future result fields.
38
40
 
39
41
  The result also includes `speakers`, grouping processed text by the service-returned speaker ID. Each entry includes `transcript` and, when the service reports `st.bg/ed`, timestamped `segments` with `start_ms`, `end_ms`, and `transcript`. With `track_mode=2`, each entry includes `track` (`L` or `R`), so agents can return each channel separately without parsing raw JSON. Do not assume speaker IDs start at 1; use the returned `speaker` value together with `track`.
40
42
 
43
+ The default formatted result is an interleaved speaker dialogue. Set `transcript_format` to `text`, `timeline`, `speaker_grouped`, `srt`, or `vtt` when another presentation is needed. The structured `utterances` list preserves the original service order.
44
+
41
45
  Use `xfyun_media` with `operation=info` to inspect sample rate, channels, codec, bitrate, and duration, or with `operation=convert` to change mono/stereo channels, sample rate, and bitrate. Conversion requires `output_path` and does not replace an existing file unless `force=true`. `ffmpeg` is provided by the launcher; `ffprobe` is used when available and the server falls back to parsing FFmpeg metadata. Set `XFYUN_FFPROBE_PATH` when a dedicated probe binary is available.
42
46
 
43
- The default language mode is `autodialect` (Chinese, English, and dialects); `autominor` enables multilingual recognition when that capability is intended. Domain values are validated against XFYun's complete list. Legacy lfasr parameters such as `eng_max_clusters` and `eng_min_clusters` are accepted through `extra` for engine compatibility and forwarded unchanged; new integrations should prefer `role_type` and `role_num`. The client accepts XFYun's observed `json_1best` variants whether the nested JSON is returned as a string or an object.
47
+ The large-model default language mode is `autodialect` (Chinese, English, and dialects); `autominor` enables multilingual recognition when that capability is intended. Standard defaults to `cn` and exposes standard-only controls such as `hot_word`, `sys_dicts`, `candidate`, `language_type`, translation, and segment limits. Domain values are validated against XFYun's complete list. Legacy lfasr parameters such as `eng_max_clusters` and `eng_min_clusters` are accepted through `extra` for engine compatibility and forwarded unchanged; new integrations should prefer the variant's documented first-class controls. The client accepts XFYun's observed `json_1best` variants whether the nested JSON is returned as a string or an object.
48
+
49
+ These standard-only controls and advanced entitlements are optional. Ordinary transcription uses `transfer` and does not require translation, quality inspection, system dictionaries, or any of these fields unless an integration explicitly supplies them.
44
50
 
45
51
  Common setup errors:
46
52
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fruitbars/xfyun-ai-mcp",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Cross-platform stdio MCP launcher for XFYun AI capabilities",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,11 +21,11 @@
21
21
  },
22
22
  "optionalDependencies": {
23
23
  "@ffmpeg-installer/ffmpeg": "1.1.0",
24
- "@fruitbars/xfyun-ai-mcp-darwin-arm64": "0.5.0",
25
- "@fruitbars/xfyun-ai-mcp-darwin-x64": "0.5.0",
26
- "@fruitbars/xfyun-ai-mcp-linux-arm64": "0.5.0",
27
- "@fruitbars/xfyun-ai-mcp-linux-x64": "0.5.0",
28
- "@fruitbars/xfyun-ai-mcp-win32-arm64": "0.5.0",
29
- "@fruitbars/xfyun-ai-mcp-win32-x64": "0.5.0"
24
+ "@fruitbars/xfyun-ai-mcp-darwin-arm64": "0.6.0",
25
+ "@fruitbars/xfyun-ai-mcp-darwin-x64": "0.6.0",
26
+ "@fruitbars/xfyun-ai-mcp-linux-arm64": "0.6.0",
27
+ "@fruitbars/xfyun-ai-mcp-linux-x64": "0.6.0",
28
+ "@fruitbars/xfyun-ai-mcp-win32-arm64": "0.6.0",
29
+ "@fruitbars/xfyun-ai-mcp-win32-x64": "0.6.0"
30
30
  }
31
31
  }