Saves the given transcript to a .txt file named by chat ID.
(transcript: str, chat_id: str)
| 36 | |
| 37 | |
| 38 | def save_transcript_to_file(transcript: str, chat_id: str) -> None: |
| 39 | """Saves the given transcript to a .txt file named by chat ID.""" |
| 40 | transcript_file_name = f"transcript_{chat_id}.txt" |
| 41 | with open(transcript_file_name, "w", encoding="utf-8") as f: |
| 42 | f.write(transcript) |
| 43 | print(f"Transcript saved to {transcript_file_name}") |
| 44 | |
| 45 | |
| 46 | async def get_chat_transcript(client: AsyncHumeClient, chat_id: str) -> None: |
no outgoing calls
no test coverage detected