@@ -197,35 +197,3 @@ def transcription_thread(self, identifier: str):
197
197
)
198
198
self .transcription_threads [identifier ]["transcription" ] = transcription
199
199
self .transcription_threads [identifier ]["event" ].set ()
200
-
201
- # with self.transcription_lock:
202
- # while self.active_thread == identifier:
203
- # with self.sample_buffer_lock:
204
- # if len(self.sample_buffer) == 0:
205
- # continue
206
- # audio_data = self.sample_buffer.copy()
207
- # self.sample_buffer = []
208
- # audio_data = np.concatenate(audio_data)
209
- # with self.transcription_lock:
210
- # self.transcription_model.transcribe(audio_data)
211
-
212
- # # transciption of the reminder of the buffer
213
- # with self.sample_buffer_lock:
214
- # if identifier in self.transcription_buffers:
215
- # audio_data = self.transcription_buffers[identifier]
216
- # audio_data = np.concatenate(audio_data)
217
- # with self.transcription_lock:
218
- # self.transcription_model.transcribe(audio_data)
219
- # del self.transcription_buffers[identifier]
220
- # # self.transcription_model.save_wav(f"{identifier}.wav")
221
- # with self.transcription_lock:
222
- # transcription = self.transcription_model.consume_transcription()
223
- # self.logger.info(f"Transcription: {transcription}")
224
- # self.connectors["ros2"].send_message(
225
- # ROS2ARIMessage(
226
- # {"data": transcription}, {"msg_type": "std_msgs/msg/String"}
227
- # ),
228
- # "/from_human",
229
- # )
230
- # self.transcription_threads[identifier]["transcription"] = transcription
231
- # self.transcription_threads[identifier]["event"].set()
0 commit comments