Skip to main content

Python library and CLI for Speechmatics Flow API

Project description

speechmatics-flow

Python client library and CLI for Speechmatics' Flow Service API.

Getting started

To install from PyPI:

pip install speechmatics-flow

To install from source:

git clone https://github.com/speechmatics/speechmatics-flow
cd speechmatics-flow && python setup.py install

Windows users may need to run the install command with an extra flag:

python setup.py install --user

Instructions on how to create an account and generate an API key can be found here: https://docs.speechmatics.com/flow/getting-started#set-up

Example command-line usage

  • Setting URLs for connecting to flow service. These values can be used in places of the --url flag:

*Note: Requires access to microphone

speechmatics-flow --auth-token $TOKEN

Change Assistant (Amelia → Humphrey)

To set the assistant to Humphrey instead of Amelia run this command:

speechmatics-flow --auth-token $TOKEN --assistant humphrey

Load conversation_config from a config file

Instead of manually setting up conversation parameters, you can load them from a configuration file.

Create a JSON file with the template details, for example "conversation_config.json" and run flow client using the --config-file option

{
  "template_id": "flow-service-assistant-humphrey",
  "template_variables": {
    "persona": "You are an English butler named Humphrey.",
    "style": "Be charming but unpredictable.",
    "context": "You are taking a customer's order at a fast food restaurant."
  }
}
speechmatics-flow --auth-token $TOKEN --config-file conversation_config.json

Hint: Why limit Humphrey? Try changing the template_variables to see what happens if he’s not a butler but perhaps... a pirate, a celebrity chef, or a royal advisor. We won’t stop you. 🏴‍☠️

Support

If you have any issues with this library or encounter any bugs then please get in touch with us at support@speechmatics.com.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

speechmatics_flow-0.1.2.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

speechmatics_flow-0.1.2-py3-none-any.whl (21.0 kB view details)

Uploaded Python 3

File details

Details for the file speechmatics_flow-0.1.2.tar.gz.

File metadata

  • Download URL: speechmatics_flow-0.1.2.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for speechmatics_flow-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7ef7d7d30b929d124bf7c3e1e51114d6f6454a807a60a00e3483d1cce78cbb48
MD5 c36ca08c2570e275eb3399e01003e81c
BLAKE2b-256 dc9e1aa1690380c8ab29e464ab6514b274857b9711c29947b3c73b775c31f292

See more details on using hashes here.

File details

Details for the file speechmatics_flow-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for speechmatics_flow-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3ef078c91af7711b39ae49b44b6fa362a742ac8398ec0a149b537b52e6248e0b
MD5 b4cdd27ad0f89eaf0f2cae8a122704b2
BLAKE2b-256 92a15e51a357c896f08a572a3ddbeeafc917d554e0b55252e24d71a6ce1ccc8d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page