pythonOctopus - Python Quick Start

Platforms

  • Linux (x86_64)
  • macOS (x86_64, arm64)
  • Windows (x86_64)

Requirements

Picovoice Account & AccessKey

Signup or Login to Picovoice Console to get your AccessKey. Make sure to keep your AccessKey secret.

Quick Start

Setup

  1. Install Python 3.

  2. Install the pvoctopus Python package using PIP:

pip3 install pvoctopus

Usage

Create an instance of the engine and index an audio file by passing in the absolute path to the file:

import pvoctopus
octopus = pvoctopus.create(access_key='${ACCESS_KEY}')
metadata = octopus.index_audio_file("${AUDIO_FILE_PATH}")

Search audio using the generated metadata object:

matches = octopus.search(["gorilla", "terminator"])

Free resources used by Octopus:

octopus.delete();

Demo

For the Octopus Python SDK, we offer demo applications that demonstrate how to use the Speech-to-Index engine on audio files.

Setup

Install the pvoctopusdemo Python package using PIP:

pip3 install pvoctopusdemo

This package installs command-line utilities for the Octopus Python demos.

Usage

Use the --help flag to see the usage options for the demo:

octopus_demo_file --help

Run the following command to transcribe an audio file:

octopus_demo_file --access_key ${ACCESS_KEY} \
--audio_paths ${AUDIO_PATH1} ${AUDIO_PATH2} ...

For more information on our Octopus demos for Python, head over to our GitHub repository.

Resources

Packages

API

GitHub

Benchmark

Further Reading


Issue with this doc? Please let us know.