DeeptoneSDK

class DeeptoneSDK(key: String, modelFileStream: InputStream)

Base class which provides methods to handle processing of audio data into DeeptoneOutput.

Parameters

key

Deeptone model encryption key

modelFileStream

Reference of a Deeptone™ model file as InputStream

Constructors

DeeptoneSDK
Link copied to clipboard
fun DeeptoneSDK(key: String, modelFileStream: InputStream)
Initialize Deeptone™ class with license key and model file stream.

Functions

loadAudioFile
Link copied to clipboard
fun loadAudioFile(audioAssetFileDescriptor: AssetFileDescriptor): DeeptoneOutput?
Receives an AssetFileDescriptor of an audio file and returns DeeptoneOutput.
fun loadAudioFile(audioFileDescriptor: FileDescriptor): DeeptoneOutput?
Receives a FileDescriptor for an audio file and returns DeeptoneOutput.
fun loadAudioFile(audioFilePath: String): DeeptoneOutput?
Receives a String representing a file-path or http URL of an audio file and returns DeeptoneOutput.
processAudioBuffer
Link copied to clipboard
fun processAudioBuffer(audioBuffer: FloatArray): DeeptoneOutput?
Receives an FloatArray of audio samples with 16khz sampling rate and returns DeeptoneOutput.
start
Link copied to clipboard
suspend fun start()
Start configuration of Deeptone™, this method is asynchronous and should be executed successfully for Deeptone™ functionality to work correctly.
stream
Link copied to clipboard
fun stream(onData: (DeeptoneOutput) -> Unit, onSuccess: (DeeptoneOutput) -> Unit, onError: (Exception) -> Unit): DeeptoneStream

Properties

key
Link copied to clipboard
val key: String
Deeptone model encryption key
modelFileStream
Link copied to clipboard
val modelFileStream: InputStream
Reference of a Deeptone™ model file as InputStream