FSTT
  • Fcloud Speak To Text (STT)
  • [Android] FSTT SDK
    • 1. Install FSTT SDK
    • 2. FSTT SDK features
  • [iOS] FSTT SDK
    • 1. Install FSTT SDK
    • 2. FSTT SDK features
Powered by GitBook
On this page
  • Init gateway
  • Register SDK Callback
  • Start STT
  • Stop STT
  1. [Android] FSTT SDK

2. FSTT SDK features

Init gateway

Contact us for get app_id & secret_key

STTManager.initGateway("your_app_id", "your_secret_key", new IInitGatewayCallback() {
    @Override
    public void onSuccess() {

    }

    @Override
    public void onFail(@Nullable AppException error) {

    }
});
STTManager.initGateway(appId, secretKey, object : IInitGatewayCallback {
    override fun onSuccess() {
    
    }

    override fun onFail(error: AppException?) {

    }
})

Register SDK Callback

After registration, the SDK will return the corresponding status in the callback

Status
Description

onStart

Called at start record

onRecording

Called while in process recording

onSuccess

Called when completed record process and return result

onFail

Called when an error occurs in process recording

STTManager.registerSTTCallback(new ISTTCallback() {
    @Override
    public void onStart() {
        
    }

    @Override
    public void onRecording() {

    }

    @Override
    public void onFail(@Nullable AppException error) {

    }

    @Override
    public void onSuccess(@NonNull String result) {

    }
});
STTManager.registerSTTCallback(object : ISTTCallback {
    override fun onStart() {

    }

    override fun onRecording() {
    
    }

    override fun onFail(error: AppException?) {

    }

    override fun onSuccess(result: String) {

    })
})

Start STT

  • Used to start record for STT

  • When successful start, the SDK starts entering the recording state, it will be called on onStart() in callback. Handling start record successfully here.

  • When start record fails, it will be processed at callback onFail() in callback.

STTManager.startSTT();
STTManager.startSTT()

Stop STT

  • Used to stop record and process record to text result

  • When successful, the SDK will be return text result on onSuccess() in callback. Handling stop record successfully here.

  • When fails, it will be processed at callback onFail() in callback.

STTManager.stopSTT();
STTManager.stopSTT()
Previous1. Install FSTT SDKNext[iOS] FSTT SDK

Last updated 11 months ago