Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invaild input device or output device #171

Open
Rodenhhh opened this issue Mar 8, 2024 · 1 comment
Open

invaild input device or output device #171

Rodenhhh opened this issue Mar 8, 2024 · 1 comment

Comments

@Rodenhhh
Copy link

Rodenhhh commented Mar 8, 2024

I want to deploy the client on a remote server (without microphone and speakers), and it will report the following error:
image
Then I modified the play_file() module in client.py as follows:

with wave.open(filename, "rb") as wavfile:
            try:
                while self.recording:
                    data = wavfile.readframes(self.chunk)
                    if data == b"":
                        break
                    audio_array = self.bytes_to_float_array(data)
                    self.send_packet_to_server(audio_array.tobytes())
                    # self.stream.write(data)
                    
                wavfile.close()
                assert self.last_response_recieved
                while time.time() - self.last_response_recieved < self.disconnect_if_no_response_for:
                    continue
                self.send_packet_to_server(Client.END_OF_AUDIO.encode('utf-8'))
                if self.server_backend == "faster_whisper":
                    self.write_srt_file(self.srt_file_path)
                # self.stream.close()
                self.close_websocket()

I recived the missing result:
image

please tell me how to fix it ,thank you~

@Rodenhhh
Copy link
Author

I modified this part of the code. When processing long audio, I will only receive the asr result of more than ten seconds.
CNPUY4N)NDIQZFBH{NSBWA6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant