Explain in detail how the audiosource daughter classes should be implemented. What…
- User
Explain in detail how the audiosource daughter classes should be implemented. What methods, attributes, etc. and how should all be put together.
Assistant
- User
Great, thanks. I want to implement a WebAudioSource(websocket) that will read an audio source coming from a websocket. Imagine there is a microphone in a different system (it may be using even a different programming language) and it is sending the stream via websocket. How would you implement that class?
Assistant
- User
No, the websocket is defined somewhere else. This is the server, so we will have something like:
async def sr_server(websocket): source = WebAudioSource(websocket) #Other code
async def main(): async with websockets.serve(sr_server, "localhost", port): await asyncio.Future()
Assistant
- User
Assistant
- User
Ok, maybe I didn't explain how it is supposed to work. Most of what you did seems ok, but the flow should be: server starts; client connects; client waits for the user to press enter; client starts sending audio to the server; server listens and transcribes the audio; server sends a stop signal so that the client can stop recording; server sends the recognized audio to the client
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.