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
Built Distribution
File details
Details for the file speechmatics_flow-0.0.5.tar.gz
.
File metadata
- Download URL: speechmatics_flow-0.0.5.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c01408046dc307a67d75ceb51db6059d74fd4654a7a188363091350878a2c818 |
|
MD5 | 856457b59a8e1a972dd1d257f29e1eba |
|
BLAKE2b-256 | 9052b8c51d27641009b0c2f5205b5354dbf1ffdc357b1db997ee51bedb79a571 |
File details
Details for the file speechmatics_flow-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: speechmatics_flow-0.0.5-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d8a9bf0421d34a6aeddf3286dbfc6ef1523b1c4887a7a69983119b99a979986 |
|
MD5 | f2964f45162116d2a5fded3ef66ad740 |
|
BLAKE2b-256 | a2e91ecf409fc4b8d462a2cb9125eaa1e428698863d0dec8d3194b3f75fac041 |