Initialization
Before the DeepTone™ SDK can be used, it must first be initialized. Before you do so, ensure you have your License Key. If you don't, you can request it at support@oto.ai.
- Python
- Swift
The deeptone.Deeptone
class is the entry point for the DeepTone™ Python SDK. You can instantiate it like in the code
snippet below by replacing YOUR_KEY
with the provided license key:
import deeptone
engine = deeptone.Deeptone(license_key="YOUR_KEY")
After these steps the SDK is now ready to be used.
You can verify that the import and initialization were successful by trying to run the following code that prints a list with the available models.
print(engine.get_available_models())
The Deeptone
class is the entry point for the DeepTone™ iOS SDK. You can instantiate it like so:
import DeeptoneSDK
let KEY = "YOUR_LICENSE_KEY"
let filePath = Bundle.main.path(forResource: "YourModel", ofType: "model")
let deeptone = Deeptone(key: KEY, modelPath: filePath!)
deeptone.start() { result in
switch (result) {
case .Success:
print("SDK is ready!")
case .Failure(let error):
print("Something went wrong! Error: ", error)
}
}
The start
method is asynchronous. Any code that uses the DeepTone™ SDK must wait for the start
method to return Success
.
After these steps the SDK is now ready to be used.