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

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 --url $URL --auth-token $TOKEN --ssl-mode insecure

Change Assistant (Amelia → Humphrey)

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

speechmatics-flow --url $URL --auth-token $TOKEN --ssl-mode insecure --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 --url $URL --auth-token $TOKEN --ssl-mode insecure --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.0.6.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

speechmatics_flow-0.0.6-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: speechmatics_flow-0.0.6.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for speechmatics_flow-0.0.6.tar.gz
Algorithm Hash digest
SHA256 e990ce124885f6782689b486f67a1ef94935683df1b2a7824d4d4c2fc03421b5
MD5 a64755214115c1008cf0d4972ef8213d
BLAKE2b-256 16df2372733b5f608cbc1d1df11cf8dec0be5c4aa5038a22737ba45e51f15fb5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for speechmatics_flow-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8535100bdd3b54521a71e98838ce190451aad0fde332799a54ebfe1a772fa968
MD5 a18050725db7f4fc886d8f9017c4b126
BLAKE2b-256 ca0ab63375c52d630c64850cab40bd6d818d0b902f368305b685e8c65af56b57

See more details on using hashes here.

Supported by

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