MCPcopy Create free account
hub / github.com/Standard-Intelligence/hertz-dev / __init__

Method __init__

inference_client.py:15–26  ·  view source on GitHub ↗
(self, server_url="ws://localhost:8000", token_temp=None, categorical_temp=None, gaussian_temp=None)

Source from the content-addressed store, hash-verified

13
14class AudioClient:
15 def __init__(self, server_url="ws://localhost:8000", token_temp=None, categorical_temp=None, gaussian_temp=None):
16 # Convert ws:// to http:// for the base URL
17 self.base_url = server_url.replace("ws://", "http://")
18 self.server_url = f"{server_url}/audio"
19
20 # Set temperatures if provided
21 if any(t is not None for t in [token_temp, categorical_temp, gaussian_temp]):
22 self.set_temperature_and_echo(token_temp, categorical_temp, gaussian_temp)
23
24 # Initialize queues
25 self.audio_queue = queue.Queue()
26 self.output_queue = queue.Queue()
27
28 def set_temperature_and_echo(self, token_temp=None, categorical_temp=None, gaussian_temp=None, echo_testing = False):
29 """Send temperature settings to server"""

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected