diff --git a/bot_async_transcription/src/bot_async_transcription.ts b/bot_async_transcription/src/bot_async_transcription.ts index 175fa75..bf86705 100644 --- a/bot_async_transcription/src/bot_async_transcription.ts +++ b/bot_async_transcription/src/bot_async_transcription.ts @@ -47,7 +47,7 @@ export async function bot_async_transcription(args: { msg: TranscriptArtifactEve }); const readable_transcript_parts = convert_to_readable_transcript({ transcript_parts }); - // Write the transcript parts data and readable transcript to files. + // Write the transcript parts data and human-readable transcript to files. const output_path_events = path.join( process.cwd(), `output/recording-${msg.data.recording.id}/transcript.json`, @@ -58,7 +58,7 @@ export async function bot_async_transcription(args: { msg: TranscriptArtifactEve } fs.writeFileSync(output_path_events, JSON.stringify(transcript_parts, null, 2), { flag: "w+" }); - // Write the readable transcript to a file. + // Write the human-readable transcript to a file. const output_path_readable = path.join( process.cwd(), `output/recording-${msg.data.recording.id}/readable.txt`, @@ -69,7 +69,7 @@ export async function bot_async_transcription(args: { msg: TranscriptArtifactEve } fs.writeFileSync(output_path_readable, readable_transcript_parts.map((t) => t ? `${t.speaker}: ${t.paragraph}` : "").join("\n"), { flag: "w+" }); - // Return the transcript parts and readable transcript. + // Return the transcript parts and human-readable transcript. return { transcript_parts, readable_transcript_parts, diff --git a/bot_async_transcription_hybrid_diarization/src/bot_async_transcription_hybrid_diarization.ts b/bot_async_transcription_hybrid_diarization/src/bot_async_transcription_hybrid_diarization.ts index 88d4d2d..470f8c4 100644 --- a/bot_async_transcription_hybrid_diarization/src/bot_async_transcription_hybrid_diarization.ts +++ b/bot_async_transcription_hybrid_diarization/src/bot_async_transcription_hybrid_diarization.ts @@ -83,7 +83,7 @@ export async function bot_async_transcription(args: { msg: TranscriptArtifactEve const output_path_readable = path.join(output_dir, "hybrid_diarization_transcript.txt"); fs.writeFileSync(output_path_readable, readable_hybrid_transcript_parts.map((t) => t ? `${t.speaker}: ${t.paragraph}` : "").join("\n"), { flag: "w+" }); - // Return the transcript parts and readable transcript. + // Return the transcript parts and human-readable transcript. return { transcript_parts: hybrid_transcript_parts, readable_transcript_parts: readable_hybrid_transcript_parts, diff --git a/bot_real_time_transcription/src/bot_real_time_transcription.ts b/bot_real_time_transcription/src/bot_real_time_transcription.ts index f47d2f4..143f0bf 100644 --- a/bot_real_time_transcription/src/bot_real_time_transcription.ts +++ b/bot_real_time_transcription/src/bot_real_time_transcription.ts @@ -38,7 +38,7 @@ export async function bot_real_time_transcription(args: { ); fs.writeFileSync(output_path_events, JSON.stringify(transcript_parts, null, 2), { flag: "w+" }); - // Create the readable transcript from the transcript parts data and write it to a file. + // Create the human-readable transcript from the transcript parts data and write it to a file. const transcript_readable = convert_to_readable_transcript({ transcript_parts }); fs.writeFileSync( output_path_readable, @@ -47,5 +47,8 @@ export async function bot_real_time_transcription(args: { ); console.log(`Transcript data written to file: ${output_path_events}`); - console.log(`Readable transcript written to file: ${output_path_readable}`); + console.log(`human-readable transcript written to file: ${output_path_readable}`); + + console.log(`${msg.data.data.participant.name ?? msg.data.data.participant.id}: ${msg.data.data.words.map((w) => w.text).join(" ")}`); + }