(self, server_url="ws://localhost:8000", token_temp=None, categorical_temp=None, gaussian_temp=None)
| 13 | |
| 14 | class 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""" |
nothing calls this directly
no test coverage detected