mirror of
https://github.com/ggerganov/ggwave.git
synced 2026-02-06 08:37:59 +08:00
ggwave-to-file : update python example
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user