Quickstart Guide

Prerequisites

Before the DeepTone™ SDK can be used, it must first be initialized. Before you do so, ensure you have your License Key and Model file. If you don't, you can request them at support@oto.ai.

Setup

This page will guide you through the process of setting up the DeepTone™ SDK in your project. Select your platform below to get started.

Python

info

Note: Python version 3.7 is required.

Python installation

If you already have python 3.7.x installed on your machine or know how to do it, please skip this section and continue with the environment setup

To install a specific python version pyenv can be used.

To setup pyenv in Mac OS or Linux the pyenv-installer can be used. Follow the installation instructions here or directly use this command to install:

curl https://pyenv.run | bash

This will add pyenv initialisation commands to your shell's "rc" file. Reload you shell to apply the changes:

exec $SHELL

Now you are ready to use pyenv to install a specific python version:

pyenv install 3.7.x

where x should be replaced with the latest patch version. Alternatively, you can use

pyenv install --list

to get a list of all available python versions.

Once the python version 3.7 is installed, you can either set it as your local python version

pyenv local 3.7.x

such that this version of python will only be used in your current directory, or set it as your global python version with

pyenv global 3.7.x

Now you are ready to install the DeepTone™ SDK.

Environment setup

Set up your environment using your preferred Python Environment Manager.

Create a Poetry project if you don’t have one already, by running:

$ poetry new my-project
$ cd my-project
$ poetry shell

By default, new Poetry projects are created with a Python version constraint allowing the use of Python 3.7 or higher. As the SDK is currently incompatible with Python 3.8, you'll need to adjust the constraint for your project, otherwise you'll get a compatibility error.

To do so, look for the tool.poetry.dependencies section of your pyproject.toml file, and replace the Python version constraint from ^3.7 to ~3.7:

[tool.poetry.dependencies]
python = "~3.7"

Add the following to your pyproject.toml, to configure Poetry to fetch packages from OTO’s PyPI repository:

[[tool.poetry.source]]
name = "deeptone"
url = "https://sdk.oto.ai/pypi/"
secondary = true

After the repository is configured, run the following to add the dependency to your project:

$ poetry add deeptone

Validate the SDK was correctly installed, by importing it within a Python shell and executing the following commands:

$ poetry run python
Python 3.7.7 (..)
>>> import deeptone
>>> deeptone.__version__
'0.4.0'

If the import was successful, congratulations, you are now ready to use DeepTone™! Head to our Usage section to start exploring.