Skip to main content

Voice Translation V2 (TranslateVoiceV2)

AndroidiOSWindows
If you are using the Unity engine, see Unity SDK TranslateVoiceV2.

For voice translation, see FINTLTranslatorLang for the list of supported languages.

Function definition

UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static void TranslateVoiceV2(FINTLTranslatorVoiceV2Req req_info);

Parameter Descriptions

ParametersTypeDescription
req_infoFINTLTranslatorVoiceV2ReqTranslation request information. For details, see TranslatorVoiceV2Req

Observers

The callback handler interface is TranslatorResultObserver.The callback data structure is TranslatorResult.

Callback ID is kMethodIDTranslatorTranslateVoiceV2.

Code sample

	FINTLTranslatorVoiceV2Req req;
FString NativePath;

// Define path based on your project platform
#if PLATFORM_ANDROID
NativePath = FPaths::Combine(FPaths::ProjectPersistentDownloadDir(), TEXT("intl-test/000.wav"));
#elif PLATFORM_IOS
NativePath = FPaths::Combine(FPaths::ProjectPersistentDownloadDir(), TEXT("intl-test/000.wav"));
#elif PLATFORM_WINDOWS
NativePath = FPaths::Combine(FPaths::ProjectPersistentDownloadDir(), TEXT("intl-test/000.wav"));
#elif INTL_PLATFORM_SERIES_PS
NativePath = FPaths::Combine(FPaths::ProjectPersistentDownloadDir(), TEXT("intl-test/000.wav"));
#elif INTL_PLATFORM_SERIES_XBOX
NativePath = FPaths::Combine(FPaths::ProjectPersistentDownloadDir(), TEXT("intl-test/000.wav"));
#else
NativePath = FPaths::Combine(FPaths::ProjectPersistentDownloadDir(), TEXT("intl-test/000.wav"));
#endif
req.voicePath = NativePath;

// Business Project Code, please contact your business administrator for details, incorrect usage will result in error.
req_info.GameCode = "";
// Unique request ID for tracking purposes
req_info.traceId = "";

UINTLSDKAPI::TranslateVoiceV2(req);