TranslateContext.stopSpeak

Requires:
AIKit≥0.0.1
Platforms:
iOSAndroid

Method signature
TranslateContext.stopSpeak(params: )

Description

Stop speaking

Parameters

PropertyTypeRequiredDescription
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

Examples

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

const task = ai.generateTranslateTask({
  deviceId: "xx",
  dataTimeout: 1,
  originalLanguage: "xx",
  targetLanguage: "xx",
  agentId: "xx",
  success: data => {
    console.log(data);
  },
  fail: error => {
    console.error(error);
  },
});

task.stopSpeak({
  success: () => {
    console.log("success");
  },
  fail: error => {
    console.error(error);
  },
});