Skip to main content

Prerequisites

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.

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.8 and <3.11 is required. The current list of supported operating systems is:

  • Linux
  • Windows
  • macOS - Intel
  • macOS - M1

Python installation

If you already have a valid python version 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.8.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 is installed, you can either set it as your local python version

pyenv local 3.8.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.8.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

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

On the same file, change the required python version to match the version required by the SDK:

[tool.poetry.dependencies]
python = ">=3.8,<3.11"

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.8.8 (..)
>>> import deeptone
>>> deeptone.__version__
'0.13.0'

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