File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ async def _process_input_queue(self, ten_env: AsyncTenEnv) -> None:
160160
161161
162162 async def send_tts_audio_data (
163- self , audio_data : bytes
163+ self , audio_data : bytes , timestamp : int
164164 ) -> None :
165165 """End sending audio out."""
166166 try :
@@ -195,9 +195,11 @@ async def send_tts_audio_data(
195195 // (bytes_per_sample * number_of_channels )
196196 )
197197 f .alloc_buf (len (combined_data ))
198+ f .set_timestamp (timestamp )
198199 buff = f .lock_buf ()
199200 buff [:] = combined_data
200201 f .unlock_buf (buff )
202+ self .ten_env .log_debug (f"send audio frame, timestamp: { timestamp } , length: { len (combined_data )} " )
201203 await self .ten_env .send_audio_frame (f )
202204 except Exception as e :
203205 self .ten_env .log_error (
You can’t perform that action at this time.
0 commit comments