Skip to content

Commit 33fac22

Browse files
authored
Merge pull request #9 from speechmatics/examples/client_side_function_calling
Add client-side function calling example and docs update
2 parents 2d86235 + 065564d commit 33fac22

File tree

8 files changed

+396
-31
lines changed

8 files changed

+396
-31
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66

7+
## [0.0.7] - 2024-11-25
8+
9+
### Added
10+
11+
- Client-side function calling example
12+
- Improved audio playback in examples
13+
- Added instructions on how to generate an API KEY and how to install pyaudio
14+
15+
### Changed
16+
17+
- Set default URL when running from CLI
18+
719
## [0.0.6] - 2024-11-18
820

921
### Added

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,25 @@ Windows users may need to run the install command with an extra flag:
2323
python setup.py install --user
2424
```
2525

26+
Instructions on how to create an account and generate an API
27+
key can be found here: https://docs.speechmatics.com/flow/getting-started#set-up
28+
2629
## Example command-line usage
2730

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

3033
*Note: Requires access to microphone
3134

3235
```bash
33-
speechmatics-flow --url $URL --auth-token $TOKEN --ssl-mode insecure
36+
speechmatics-flow --auth-token $TOKEN --ssl-mode insecure
3437
```
3538

3639
### Change Assistant (Amelia → Humphrey)
3740

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

4043
```bash
41-
speechmatics-flow --url $URL --auth-token $TOKEN --ssl-mode insecure --assistant humphrey
44+
speechmatics-flow --auth-token $TOKEN --ssl-mode insecure --assistant humphrey
4245
```
4346

4447
### Load conversation_config from a config file
@@ -60,7 +63,7 @@ using the `--config-file` option
6063
```
6164

6265
```bash
63-
speechmatics-flow --url $URL --auth-token $TOKEN --ssl-mode insecure --config-file conversation_config.json
66+
speechmatics-flow --auth-token $TOKEN --ssl-mode insecure --config-file conversation_config.json
6467
```
6568

6669
> **Hint**: Why limit Humphrey? Try changing the template_variables to see what happens if he’s not a butler but

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.6
1+
0.0.7

examples/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Examples using Flow API
2+
3+
## Installation
4+
5+
The Speechmatics Flow library and CLI can be installed using pip:
6+
7+
```bash
8+
pip3 install speechmatics-flow
9+
```
10+
11+
## Prerequisites
12+
13+
### Generate an API Key
14+
15+
Instructions on how to create an account and generate an API
16+
key can be found here: https://docs.speechmatics.com/flow/getting-started#set-up
17+
18+
Set the API Key environment variable required to run the examples:
19+
20+
```bash
21+
export SPEECHMATICS_API_KEY=$API_KEY
22+
```
23+
24+
To use this script, you may also need to install PyAudio by running:
25+
26+
### Windows
27+
28+
```bash
29+
python -m pip install pyaudio
30+
```
31+
32+
### macOS
33+
34+
```bash
35+
brew instal portaudio
36+
pip3 install pyaudio
37+
```
38+
39+
### GNU/Linux
40+
41+
```bash
42+
sudo apt install python3-pyaudio
43+
```

0 commit comments

Comments
 (0)