rampup 0.1.6 ā 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +10 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -848,6 +848,7 @@ async function runRealtimeVoiceMode(authToken, context, projectPath, usage, usag
|
|
|
848
848
|
let micInstance = null;
|
|
849
849
|
let micInputStream = null;
|
|
850
850
|
let audioChunks = [];
|
|
851
|
+
let transcriptChunks = [];
|
|
851
852
|
let isListening = false;
|
|
852
853
|
let sessionDurationSeconds = 0;
|
|
853
854
|
const sessionTimer = setInterval(() => sessionDurationSeconds++, 1000);
|
|
@@ -923,21 +924,26 @@ Be friendly, practical, and reference specific files when relevant. If asked abo
|
|
|
923
924
|
break;
|
|
924
925
|
|
|
925
926
|
case 'response.audio_transcript.delta':
|
|
926
|
-
//
|
|
927
|
+
// Collect transcript (don't show yet - will display after audio)
|
|
927
928
|
if (event.delta) {
|
|
928
|
-
|
|
929
|
+
transcriptChunks.push(event.delta);
|
|
929
930
|
}
|
|
930
931
|
break;
|
|
931
932
|
|
|
932
933
|
case 'response.audio_transcript.done':
|
|
933
|
-
|
|
934
|
+
// Transcript complete
|
|
934
935
|
break;
|
|
935
936
|
|
|
936
937
|
case 'response.audio.done':
|
|
937
|
-
// Play
|
|
938
|
+
// Play audio first, then show transcript
|
|
938
939
|
if (audioChunks.length > 0) {
|
|
939
940
|
await playAudioChunks(audioChunks);
|
|
941
|
+
// Show transcript after audio finishes
|
|
942
|
+
if (transcriptChunks.length > 0) {
|
|
943
|
+
console.log(chalk.cyan(`\nš Ramp: ${transcriptChunks.join('')}\n`));
|
|
944
|
+
}
|
|
940
945
|
audioChunks = [];
|
|
946
|
+
transcriptChunks = [];
|
|
941
947
|
}
|
|
942
948
|
break;
|
|
943
949
|
|