From 6319dc356d21244ec5128f3f6ca5b15be6c1d6c2 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Fri, 25 Jun 2021 19:32:28 +0300 Subject: [PATCH] ggwave-to-file : update python example --- examples/ggwave-to-file/ggwave-to-file.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/ggwave-to-file/ggwave-to-file.py b/examples/ggwave-to-file/ggwave-to-file.py index 446d1c7..8819ca2 100644 --- a/examples/ggwave-to-file/ggwave-to-file.py +++ b/examples/ggwave-to-file/ggwave-to-file.py @@ -1,7 +1,7 @@ import sys import requests -def ggwave(message: str, protocolId: int = 1, sampleRate: float = 48000, volume: int = 50): +def ggwave(message: str, protocolId: int = 1, sampleRate: float = 48000, volume: int = 50, payloadLength: int = -1): url = 'https://ggwave-to-file.ggerganov.com/' @@ -10,6 +10,7 @@ def ggwave(message: str, protocolId: int = 1, sampleRate: float = 48000, volume: 'p': protocolId, # transmission protocol to use 's': sampleRate, # output sample rate 'v': volume, # output volume + 'l': payloadLength, # if positive - use fixed-length encoding } response = requests.get(url, params=params)