processRecordTransferResult

Requires:
WearKit≥1.0.0@ray-js/ray≥1.7.14
Platforms:
iOSAndroid
import { wear } from '@ray-js/ray';

const { processRecordTransferResult } = wear;

// Promise usage
try {
  const res = await processRecordTransferResult({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Method signature
processRecordTransferResult(params: )

Description

Process recording transcription or summary result with SMART_MATCH or CUSTOM mode.

Parameters

PropertyTypeRequiredDescriptionWearKit SinceMinimum SDK versions
recordTransferIdnumberYesRecording transcription ID-
Androidcom.thingclips.smart:thingsmart-bizbundle-wearkit
≥ 6.7.0
templatestringYesTemplate: Required in CUSTOM mode (e.g., general summary, meeting minutes); not required in SMART_MATCH mode (auto-matched by the cloud based on the audio content)-
Androidcom.thingclips.smart:thingsmart-bizbundle-wearkit
≥ 6.7.0
languagestringYesLanguage: Source language of the audio (applies when taskType=0 (upload + transcription))-
Androidcom.thingclips.smart:thingsmart-bizbundle-wearkit
≥ 6.7.0
taskTypenumberYesTask type: 0: Upload + transcription with summary, 1: Text-only summary (TTT), 2: Translationv1.2.2
Androidcom.thingclips.smart:thingsmart-bizbundle-wearkit
≥ 6.11.0
transLangstringYesTarget language for summary output; if omitted, defaults to the transcription language - optionalv1.4.0
Androidcom.thingclips.smart:thingsmart-bizbundle-wearkit
≥ 6.11.0
summaryLangstringYesTarget language for translation or summary: Optional in CUSTOM mode; not required in SMART_MATCH mode (the cloud automatically infers it from the transcription)v1.4.0
Androidcom.thingclips.smart:thingsmart-bizbundle-wearkit
≥ 6.11.0
enableSpeakerbooleanYesEnable speaker diarization: In SMART_MATCH mode, it is recommended to let the cloud decide (blacklisted languages are auto-disabled); in CUSTOM mode, uses the specified boolean valuev1.4.0
Androidcom.thingclips.smart:thingsmart-bizbundle-wearkit
≥ 6.11.0
generateModestringNoGeneration mode: SMART_MATCH (intelligent match) | CUSTOM (custom settings); defaults to CUSTOM if omittedv3.6.0—
enableImageTextbooleanNoWhether to generate a text-and-image summary: true to enable, false to disable; if omitted, default rules apply (SMART_MATCH follows cloud decision; CUSTOM defaults to off)v3.6.0—
complete() => voidNoCompletion callback (executed on both success and failure)-—
success() => voidNoCallback on successful API call-—
fail(params: Object) => voidNoFailure callback-—
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Error Code

Error CodeError Message
10001Internal error
10011Network error
10012Record not found

Examples

SMART_MATCH mode (intelligent match)

import { wear } from '@ray-js/ray'

wear.processRecordTransferResult({
  recordTransferId: 1001,
  template: 'auto',
  language: 'zh',
  transLang: 'en',
  summaryLang: 'zh',
  taskType: 1,
  generateMode: 'SMART_MATCH',
  enableSpeaker: true,
  enableImageText: true,
  success: () => {
    console.log('processRecordTransferResult SMART_MATCH success');
  },
  fail: error => {
    console.error(error);
  },
});

CUSTOM mode (custom settings)

import { wear } from '@ray-js/ray'

wear.processRecordTransferResult({
  recordTransferId: 1001,
  template: 'meeting_summary',
  language: 'zh',
  taskType: 1,
  transLang: 'en',
  summaryLang: 'zh',
  enableSpeaker: true,
  generateMode: 'CUSTOM',
  enableImageText: false,
  success: () => {
    console.log('processRecordTransferResult CUSTOM success');
  },
  fail: error => {
    console.error(error);
  },
});