Installation

You can simply use pip:

pip install phoneshift

Phoneshift is a “connected module”: First, you have to provide an API token in the environement variables that you obtain through the phoneshift website, ex.:

export PHONESHIFT_API_TOKEN=api_duJhSwq878ii44VkyD0X3AIjG1eBpf0kZM3Zek4YXQHTlZhgGqxrWip7z6p8pyUW

Then, you can run some python code, ex.:

python -c 'import phoneshift; print(phoneshift.__version__)'

License verification

When loading the module with import phoneshift, the API token will be checked through the network and thus validate your usage license. This validation process starts when the module is loading, in the background, thus minimizing any delay before audio processing.

If the license is not valid, and you run any transformation function, a RuntimeError exception will be raised.

Note

No matter the validity of your license, you will always be able to import the phoneshift module. This is to avoid that a licensing issue blocks a whole SaaS service that makes use of phoneshift as an option only.

Note

No audio stream will be passed to phoneshift servers. 100% of the processing is done locally on your machine. Network connectivity is only used to validate your usage license and send very light anonymized usage information.

Note

Why is it connected to the network and why does it need a license validation? The reasons are the following:

  • Pay us for our work building this tool.

  • Pay us when we take care of users’ requests.

  • Get usage feedback that is objective, which is complementary to personnal feedback (that we love receiving too!)

  • Gather usage statistics that help us setting priorities for the development.

  • Pick up some technical audio issues that might happen along the processing flow.

As you can see, this is not yet another rent-seeking mechanism. As soon as there will be no more active development and maintenance on this project, we will be more than happy to merge phoneshift into the open-source project phaseshift, thus making it free for everyone.

Testing

To verify that everything is setup properly, you can run the tests provided with the module:

python -c 'import phoneshift.tests; phoneshift.tests.run()'

This runs very simple regression tests and smoke tests.

This command does not run all regressions tests for audio processing, as they are too heavy to be shiped with the python module.