@eldrforge/audio-tools 0.1.6 → 0.1.8

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/dist/index.js CHANGED
@@ -1,51 +1,249 @@
1
+ import { getLogger } from '@eldrforge/shared';
2
+ export { getLogger, setLogger } from '@eldrforge/shared';
1
3
  import { selectAndConfigureAudioDevice, processAudio } from '@theunwalked/unplayable';
2
4
  import { homedir } from 'os';
3
5
  import { join } from 'path';
4
6
  import { promises } from 'fs';
5
7
  import { transcribeAudio as transcribeAudio$1 } from '@eldrforge/ai-service';
6
8
 
9
+ function _define_property(obj, key, value) {
10
+ if (key in obj) {
11
+ Object.defineProperty(obj, key, {
12
+ value: value,
13
+ enumerable: true,
14
+ configurable: true,
15
+ writable: true
16
+ });
17
+ } else {
18
+ obj[key] = value;
19
+ }
20
+ return obj;
21
+ }
22
+ /**
23
+ * ANSI escape codes for terminal control
24
+ */ const ANSI = {
25
+ // Cursor movement
26
+ CURSOR_UP: '\x1b[1A',
27
+ CURSOR_TO_START: '\x1b[0G',
28
+ CLEAR_LINE: '\x1b[2K',
29
+ // Colors
30
+ RED: '\x1b[31m',
31
+ CYAN: '\x1b[36m',
32
+ RESET: '\x1b[0m',
33
+ // Text styles
34
+ BOLD: '\x1b[1m'};
35
+ /**
36
+ * Format seconds into MM:SS format
37
+ */ function formatTime(seconds) {
38
+ const minutes = Math.floor(seconds / 60);
39
+ const remainingSeconds = seconds % 60;
40
+ return `${minutes.toString().padStart(2, '0')}:${remainingSeconds.toString().padStart(2, '0')}`;
41
+ }
7
42
  /**
8
- * Logger utilities for audio-tools
9
- */ let logger;
43
+ * Generate a beep sound using process.stdout.write with ASCII bell character
44
+ */ function beep() {
45
+ process.stdout.write('\x07'); // ASCII bell character
46
+ }
10
47
  /**
11
- * Set the logger instance
12
- */ function setLogger(newLogger) {
13
- logger = newLogger;
48
+ * Check if terminal supports colors and cursor movement
49
+ */ function supportsAnsi() {
50
+ return process.stdout.isTTY && process.env.TERM !== 'dumb' && !process.env.NO_COLOR;
14
51
  }
15
52
  /**
16
- * Get the current logger or create a console fallback
17
- */ function getLogger() {
18
- if (logger) {
19
- return logger;
53
+ * Display a live countdown timer that updates in place
54
+ */ class CountdownTimer {
55
+ /**
56
+ * Start the countdown timer
57
+ */ start() {
58
+ return new Promise((resolve)=>{
59
+ // Handle zero seconds case
60
+ if (this.currentSeconds <= 0) {
61
+ this.options.onComplete();
62
+ resolve();
63
+ return;
64
+ }
65
+ // Display initial countdown
66
+ this.displayCountdown();
67
+ this.intervalId = setInterval(()=>{
68
+ // Check if destroyed before processing
69
+ if (this.isDestroyed) {
70
+ clearInterval(this.intervalId);
71
+ resolve();
72
+ return;
73
+ }
74
+ this.currentSeconds--;
75
+ // Check for beep warning
76
+ if (this.options.beepAt30Seconds && this.currentSeconds === 30 && !this.hasBeepedAt30) {
77
+ beep();
78
+ this.hasBeepedAt30 = true;
79
+ }
80
+ // Call tick callback
81
+ this.options.onTick(this.currentSeconds);
82
+ if (this.currentSeconds <= 0) {
83
+ this.stop();
84
+ this.options.onComplete();
85
+ resolve();
86
+ } else {
87
+ this.displayCountdown();
88
+ }
89
+ }, 1000);
90
+ });
20
91
  }
21
- // Console fallback
22
- /* eslint-disable no-console */ return {
23
- error: (message, ...args)=>console.error(message, ...args),
24
- warn: (message, ...args)=>console.warn(message, ...args),
25
- info: (message, ...args)=>console.log(message, ...args),
26
- debug: (message, ...args)=>console.debug(message, ...args)
27
- };
28
- /* eslint-enable no-console */ }
29
-
92
+ /**
93
+ * Stop the countdown timer
94
+ */ stop() {
95
+ if (this.isDestroyed) {
96
+ return;
97
+ }
98
+ if (this.intervalId) {
99
+ clearInterval(this.intervalId);
100
+ this.intervalId = null;
101
+ }
102
+ if (this.options.clearOnComplete && this.supportsAnsi) {
103
+ // Clear the countdown line
104
+ process.stdout.write(ANSI.CURSOR_TO_START + ANSI.CLEAR_LINE);
105
+ } else if (!this.isFirstDisplay) {
106
+ // Add a newline if we've been updating in place
107
+ process.stdout.write('\n');
108
+ }
109
+ }
110
+ /**
111
+ * Get current remaining time
112
+ */ getRemainingSeconds() {
113
+ return this.currentSeconds;
114
+ }
115
+ /**
116
+ * Display the countdown timer
117
+ */ displayCountdown() {
118
+ const timeString = formatTime(this.currentSeconds);
119
+ const isWarningTime = this.currentSeconds <= 30;
120
+ let output;
121
+ if (this.supportsAnsi) {
122
+ // Use colors and in-place updating if supported
123
+ if (!this.isFirstDisplay) {
124
+ // Move cursor up and clear the line to overwrite previous countdown
125
+ process.stdout.write(ANSI.CURSOR_UP + ANSI.CURSOR_TO_START + ANSI.CLEAR_LINE);
126
+ }
127
+ const color = isWarningTime && this.options.redAt30Seconds ? ANSI.RED : ANSI.CYAN;
128
+ const style = isWarningTime ? ANSI.BOLD : '';
129
+ output = `${color}${style}⏱️ Recording time remaining: ${timeString}${ANSI.RESET}`;
130
+ } else {
131
+ // Fallback for terminals that don't support ANSI
132
+ const warning = isWarningTime ? ' ⚠️ ' : '';
133
+ output = `⏱️ Recording time remaining: ${timeString}${warning}`;
134
+ }
135
+ process.stdout.write(output + '\n');
136
+ this.isFirstDisplay = false;
137
+ }
138
+ /**
139
+ * Set up cleanup handlers for process termination and uncaught exceptions
140
+ */ setupCleanupHandlers() {
141
+ // Skip setting up process listeners in test environments to avoid listener leaks
142
+ if (process.env.NODE_ENV === 'test' || process.env.VITEST) {
143
+ return;
144
+ }
145
+ const cleanup = ()=>{
146
+ this.destroy();
147
+ };
148
+ // Handle various exit scenarios
149
+ const exitHandler = ()=>cleanup();
150
+ const uncaughtExceptionHandler = (error)=>{
151
+ cleanup();
152
+ // Re-throw to maintain normal error handling
153
+ throw error;
154
+ };
155
+ process.on('exit', exitHandler);
156
+ process.on('SIGINT', exitHandler);
157
+ process.on('SIGTERM', exitHandler);
158
+ process.on('uncaughtException', uncaughtExceptionHandler);
159
+ process.on('unhandledRejection', cleanup);
160
+ // Store handlers for removal during destroy
161
+ this.cleanupHandlers = [
162
+ ()=>process.removeListener('exit', exitHandler),
163
+ ()=>process.removeListener('SIGINT', exitHandler),
164
+ ()=>process.removeListener('SIGTERM', exitHandler),
165
+ ()=>process.removeListener('uncaughtException', uncaughtExceptionHandler),
166
+ ()=>process.removeListener('unhandledRejection', cleanup)
167
+ ];
168
+ }
169
+ /**
170
+ * Destroy the timer and clean up all resources
171
+ */ destroy() {
172
+ if (this.isDestroyed) {
173
+ return;
174
+ }
175
+ this.isDestroyed = true;
176
+ this.stop();
177
+ // Remove all process event listeners
178
+ this.cleanupHandlers.forEach((handler)=>{
179
+ try {
180
+ handler();
181
+ } catch {
182
+ // Ignore errors during cleanup
183
+ }
184
+ });
185
+ this.cleanupHandlers = [];
186
+ }
187
+ /**
188
+ * Check if the timer has been destroyed
189
+ */ isTimerDestroyed() {
190
+ return this.isDestroyed;
191
+ }
192
+ constructor(options){
193
+ _define_property(this, "options", void 0);
194
+ _define_property(this, "intervalId", null);
195
+ _define_property(this, "currentSeconds", void 0);
196
+ _define_property(this, "hasBeepedAt30", false);
197
+ _define_property(this, "isFirstDisplay", true);
198
+ _define_property(this, "supportsAnsi", void 0);
199
+ _define_property(this, "cleanupHandlers", []);
200
+ _define_property(this, "isDestroyed", false);
201
+ this.options = {
202
+ beepAt30Seconds: true,
203
+ redAt30Seconds: true,
204
+ onTick: ()=>{},
205
+ onComplete: ()=>{},
206
+ clearOnComplete: false,
207
+ ...options
208
+ };
209
+ this.currentSeconds = this.options.durationSeconds;
210
+ this.supportsAnsi = supportsAnsi();
211
+ // Set up cleanup handlers for process termination
212
+ this.setupCleanupHandlers();
213
+ }
214
+ }
215
+ /**
216
+ * Create and start a countdown timer (convenience function)
217
+ */ async function startCountdown(options) {
218
+ const timer = new CountdownTimer(options);
219
+ return timer.start();
220
+ }
221
+ /**
222
+ * Create a countdown timer for audio recording with sensible defaults
223
+ */ function createAudioRecordingCountdown(durationSeconds) {
224
+ return new CountdownTimer({
225
+ durationSeconds,
226
+ beepAt30Seconds: true,
227
+ redAt30Seconds: true,
228
+ clearOnComplete: true
229
+ });
230
+ }
30
231
  /**
31
- * Display countdown before recording
232
+ * Simple countdown function for backwards compatibility
32
233
  * @param seconds Number of seconds to count down
33
234
  * @param onTick Optional callback called on each tick
235
+ * @deprecated Use CountdownTimer or startCountdown for more features
34
236
  */ async function countdown(seconds, onTick) {
35
- const logger = getLogger();
36
- for(let i = seconds; i > 0; i--){
37
- logger.info(`Recording in ${i}...`);
38
- if (onTick) {
39
- onTick(i);
40
- }
41
- await sleep(1000);
237
+ const options = {
238
+ durationSeconds: seconds,
239
+ beepAt30Seconds: false,
240
+ redAt30Seconds: false,
241
+ clearOnComplete: false
242
+ };
243
+ if (onTick) {
244
+ options.onTick = onTick;
42
245
  }
43
- logger.info('Recording!');
44
- }
45
- /**
46
- * Sleep for specified milliseconds
47
- */ function sleep(ms) {
48
- return new Promise((resolve)=>setTimeout(resolve, ms));
246
+ await startCountdown(options);
49
247
  }
50
248
 
51
249
  /**
@@ -122,24 +320,72 @@ import { transcribeAudio as transcribeAudio$1 } from '@eldrforge/ai-service';
122
320
  }
123
321
  }
124
322
  /**
125
- * Archive audio file to specified directory
126
- */ async function archiveAudio(audioPath, archiveDir, filename) {
323
+ * Get timestamped filename for archiving
324
+ */ function getTimestampedFilename(baseName, extension = '.json') {
325
+ const now = new Date();
326
+ // Format as YYMMdd-HHmm (e.g., 250701-1030)
327
+ const yy = now.getFullYear().toString().slice(-2);
328
+ const mm = (now.getMonth() + 1).toString().padStart(2, '0');
329
+ const dd = now.getDate().toString().padStart(2, '0');
330
+ const hh = now.getHours().toString().padStart(2, '0');
331
+ const min = now.getMinutes().toString().padStart(2, '0');
332
+ const timestamp = `${yy}${mm}${dd}-${hh}${min}`;
333
+ return `${timestamp}-${baseName}${extension}`;
334
+ }
335
+ /**
336
+ * Get timestamped filename for archived audio
337
+ */ function getTimestampedArchivedAudioFilename(originalExtension = '.wav') {
338
+ return getTimestampedFilename('review-audio', originalExtension);
339
+ }
340
+ /**
341
+ * Get timestamped filename for archived transcript
342
+ */ function getTimestampedArchivedTranscriptFilename() {
343
+ return getTimestampedFilename('review-transcript', '.md');
344
+ }
345
+ /**
346
+ * Archive audio file with transcription to specified directory
347
+ * This saves BOTH the audio file AND transcription text together
348
+ * @param originalAudioPath Path to the original audio file
349
+ * @param transcriptionText The transcribed text content
350
+ * @param outputDirectory Directory to save archived files (default: 'output')
351
+ * @returns Paths to both archived audio and transcript files
352
+ */ async function archiveAudio(originalAudioPath, transcriptionText, outputDirectory = 'output') {
127
353
  const logger = getLogger();
354
+ const path = await import('path');
128
355
  try {
129
- // Ensure archive directory exists
130
- await promises.mkdir(archiveDir, {
356
+ // Ensure the output directory exists
357
+ await promises.mkdir(outputDirectory, {
131
358
  recursive: true
132
359
  });
133
- // Determine archive filename
134
- const basename = filename || `audio-${Date.now()}.wav`;
135
- const archivePath = join(archiveDir, basename);
136
- // Copy file to archive
137
- await promises.copyFile(audioPath, archivePath);
138
- logger.info(`Audio archived to: ${archivePath}`);
139
- return archivePath;
360
+ // Get file extension from original audio file
361
+ const originalExtension = path.extname(originalAudioPath);
362
+ // Generate timestamped filenames
363
+ const archivedAudioFilename = getTimestampedArchivedAudioFilename(originalExtension);
364
+ const archivedTranscriptFilename = getTimestampedArchivedTranscriptFilename();
365
+ // Full paths for archived files
366
+ const archivedAudioPath = path.join(outputDirectory, archivedAudioFilename);
367
+ const archivedTranscriptPath = path.join(outputDirectory, archivedTranscriptFilename);
368
+ // Copy audio file if it exists
369
+ try {
370
+ await promises.access(originalAudioPath);
371
+ const audioBuffer = await promises.readFile(originalAudioPath);
372
+ await promises.writeFile(archivedAudioPath, audioBuffer);
373
+ logger.debug('Archived audio file to: %s', archivedAudioPath);
374
+ } catch {
375
+ logger.warn('AUDIO_FILE_NOT_FOUND: Original audio file not accessible | Path: %s | Impact: Cannot archive original', originalAudioPath);
376
+ }
377
+ // Save transcription text
378
+ const transcriptContent = `# Audio Transcription Archive\n\n**Original Audio File:** ${originalAudioPath}\n**Archived:** ${new Date().toISOString()}\n\n## Transcription\n\n${transcriptionText}`;
379
+ await promises.writeFile(archivedTranscriptPath, transcriptContent, 'utf8');
380
+ logger.debug('Archived transcription to: %s', archivedTranscriptPath);
381
+ logger.info('AUDIO_ARCHIVED: Audio and transcript archived successfully | Audio: %s | Transcript: %s | Status: archived', archivedAudioFilename, archivedTranscriptFilename);
382
+ return {
383
+ audioPath: archivedAudioPath,
384
+ transcriptPath: archivedTranscriptPath
385
+ };
140
386
  } catch (error) {
141
- logger.error('Failed to archive audio:', error);
142
- throw new Error(`Archive failed: ${error}`);
387
+ logger.error('AUDIO_ARCHIVE_FAILED: Failed to archive audio files | Error: %s | Impact: Audio not preserved', error.message);
388
+ throw new Error(`Audio archiving failed: ${error.message}`);
143
389
  }
144
390
  }
145
391
  /**
@@ -181,5 +427,5 @@ import { transcribeAudio as transcribeAudio$1 } from '@eldrforge/ai-service';
181
427
  }
182
428
  }
183
429
 
184
- export { archiveAudio, countdown, deleteAudio, findDevice, getAudioDuration, getDefaultDevice, getLogger, listAudioDevices, recordAudio, selectDeviceInteractive, setLogger, transcribeAudio };
430
+ export { CountdownTimer, archiveAudio, countdown, createAudioRecordingCountdown, deleteAudio, findDevice, getAudioDuration, getDefaultDevice, getTimestampedArchivedAudioFilename, getTimestampedArchivedTranscriptFilename, listAudioDevices, recordAudio, selectDeviceInteractive, startCountdown, transcribeAudio };
185
431
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/logger.ts","../src/countdown.ts","../src/devices.ts","../src/recording.ts","../src/transcription.ts"],"sourcesContent":["/**\n * Logger utilities for audio-tools\n */\n\nimport type { Logger } from './types';\n\nlet logger: Logger | undefined;\n\n/**\n * Set the logger instance\n */\nexport function setLogger(newLogger: Logger): void {\n logger = newLogger;\n}\n\n/**\n * Get the current logger or create a console fallback\n */\nexport function getLogger(): Logger {\n if (logger) {\n return logger;\n }\n\n // Console fallback\n /* eslint-disable no-console */\n return {\n error: (message: string, ...args: any[]) => console.error(message, ...args),\n warn: (message: string, ...args: any[]) => console.warn(message, ...args),\n info: (message: string, ...args: any[]) => console.log(message, ...args),\n debug: (message: string, ...args: any[]) => console.debug(message, ...args),\n };\n /* eslint-enable no-console */\n}\n\n","/**\n * Countdown timer for audio recording\n */\n\nimport { getLogger } from './logger';\n\n/**\n * Display countdown before recording\n * @param seconds Number of seconds to count down\n * @param onTick Optional callback called on each tick\n */\nexport async function countdown(\n seconds: number,\n onTick?: (remaining: number) => void\n): Promise<void> {\n const logger = getLogger();\n\n for (let i = seconds; i > 0; i--) {\n logger.info(`Recording in ${i}...`);\n\n if (onTick) {\n onTick(i);\n }\n\n await sleep(1000);\n }\n\n logger.info('Recording!');\n}\n\n/**\n * Sleep for specified milliseconds\n */\nfunction sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n","/**\n * Audio device detection and selection\n */\n\nimport { selectAndConfigureAudioDevice } from '@theunwalked/unplayable';\nimport { homedir } from 'os';\nimport { join } from 'path';\nimport { getLogger } from './logger';\nimport type { AudioDevice } from './types';\n\n/**\n * List all available audio input devices\n * Note: This is a placeholder - @theunwalked/unplayable doesn't provide a direct API for this\n * In practice, you would use selectAndConfigureAudioDevice for device selection\n */\nexport async function listAudioDevices(): Promise<AudioDevice[]> {\n const logger = getLogger();\n\n // This would require extending @theunwalked/unplayable or using a different library\n logger.warn('listAudioDevices is not fully implemented - use selectDeviceInteractive instead');\n return [];\n}\n\n/**\n * Get the default audio input device\n */\nexport async function getDefaultDevice(): Promise<AudioDevice | null> {\n const devices = await listAudioDevices();\n return devices.find((d) => d.isDefault) || devices[0] || null;\n}\n\n/**\n * Find device by ID or name\n */\nexport async function findDevice(idOrName: string): Promise<AudioDevice | null> {\n const devices = await listAudioDevices();\n\n return (\n devices.find((d) => d.id === idOrName) ||\n devices.find((d) => d.name === idOrName) ||\n null\n );\n}\n\n/**\n * Interactive device selection using @theunwalked/unplayable\n * This function uses the built-in interactive device selector\n */\nexport async function selectDeviceInteractive(): Promise<string> {\n const logger = getLogger();\n\n try {\n const preferencesDir = join(homedir(), '.unplayable');\n const result = await selectAndConfigureAudioDevice(preferencesDir, logger, false);\n return result;\n } catch (error) {\n logger.error('Device selection failed:', error);\n throw new Error(`Device selection failed: ${error}`);\n }\n}\n\n","/**\n * Audio recording functionality\n */\n\nimport { processAudio } from '@theunwalked/unplayable';\nimport { promises as fs } from 'fs';\nimport { join } from 'path';\nimport { getLogger } from './logger';\nimport type { RecordingOptions, RecordingResult } from './types';\n\n/**\n * Record audio using @theunwalked/unplayable\n */\nexport async function recordAudio(\n options: RecordingOptions = {}\n): Promise<RecordingResult> {\n const logger = getLogger();\n\n const {\n duration,\n outputPath,\n } = options;\n\n const startTime = Date.now();\n\n try {\n logger.info('Starting audio recording...');\n logger.info('Press ENTER to stop recording');\n\n const audioResult = await processAudio({\n file: undefined,\n maxRecordingTime: duration,\n outputDirectory: outputPath ? outputPath.substring(0, outputPath.lastIndexOf('/')) : 'output',\n debug: false\n });\n\n if (audioResult.cancelled) {\n throw new Error('Recording cancelled by user');\n }\n\n const endTime = Date.now();\n const actualDuration = (endTime - startTime) / 1000;\n\n // Get file stats\n const filePath = audioResult.audioFilePath || join('output', `recording-${Date.now()}.wav`);\n const stats = await fs.stat(filePath);\n\n logger.info(`Recording complete: ${filePath}`);\n logger.info(`Duration: ${actualDuration.toFixed(2)} seconds`);\n logger.info(`File size: ${(stats.size / 1024).toFixed(2)} KB`);\n\n return {\n filePath,\n duration: actualDuration,\n fileSize: stats.size,\n };\n } catch (error) {\n logger.error('Recording failed:', error);\n throw new Error(`Recording failed: ${error}`);\n }\n}\n\n/**\n * Archive audio file to specified directory\n */\nexport async function archiveAudio(\n audioPath: string,\n archiveDir: string,\n filename?: string\n): Promise<string> {\n const logger = getLogger();\n\n try {\n // Ensure archive directory exists\n await fs.mkdir(archiveDir, { recursive: true });\n\n // Determine archive filename\n const basename = filename || `audio-${Date.now()}.wav`;\n const archivePath = join(archiveDir, basename);\n\n // Copy file to archive\n await fs.copyFile(audioPath, archivePath);\n\n logger.info(`Audio archived to: ${archivePath}`);\n return archivePath;\n } catch (error) {\n logger.error('Failed to archive audio:', error);\n throw new Error(`Archive failed: ${error}`);\n }\n}\n\n/**\n * Delete audio file\n */\nexport async function deleteAudio(audioPath: string): Promise<void> {\n const logger = getLogger();\n\n try {\n await fs.unlink(audioPath);\n logger.debug(`Deleted audio file: ${audioPath}`);\n } catch (error: any) {\n if (error.code !== 'ENOENT') {\n logger.warn(`Failed to delete audio file: ${error}`);\n }\n }\n}\n\n/**\n * Get audio file duration (requires external library or audio analysis)\n * For now, returns null - can be enhanced later\n */\nexport async function getAudioDuration(_audioPath: string): Promise<number | null> {\n // TODO: Implement audio duration detection\n // May require additional library like 'music-metadata'\n return null;\n}\n\n","/**\n * Audio transcription utilities\n * Wraps @eldrforge/ai-service for convenience\n */\n\nimport { transcribeAudio as aiTranscribe } from '@eldrforge/ai-service';\nimport { getLogger } from './logger';\n\n/**\n * Transcribe audio file using AI service\n * This is a convenience wrapper around @eldrforge/ai-service\n */\nexport async function transcribeAudio(audioPath: string): Promise<string> {\n const logger = getLogger();\n\n try {\n logger.info('Transcribing audio...');\n const result = await aiTranscribe(audioPath);\n const transcript = result.text;\n logger.info('Transcription complete');\n return transcript;\n } catch (error) {\n logger.error('Transcription failed:', error);\n throw new Error(`Transcription failed: ${error}`);\n }\n}\n\n"],"names":["logger","setLogger","newLogger","getLogger","error","message","args","console","warn","info","log","debug","countdown","seconds","onTick","i","sleep","ms","Promise","resolve","setTimeout","listAudioDevices","getDefaultDevice","devices","find","d","isDefault","findDevice","idOrName","id","name","selectDeviceInteractive","preferencesDir","join","homedir","result","selectAndConfigureAudioDevice","Error","recordAudio","options","duration","outputPath","startTime","Date","now","audioResult","processAudio","file","undefined","maxRecordingTime","outputDirectory","substring","lastIndexOf","cancelled","endTime","actualDuration","filePath","audioFilePath","stats","fs","stat","toFixed","size","fileSize","archiveAudio","audioPath","archiveDir","filename","mkdir","recursive","basename","archivePath","copyFile","deleteAudio","unlink","code","getAudioDuration","_audioPath","transcribeAudio","aiTranscribe","transcript","text"],"mappings":";;;;;;AAAA;;AAEC,IAID,IAAIA,MAAAA;AAEJ;;IAGO,SAASC,SAAAA,CAAUC,SAAiB,EAAA;IACvCF,MAAAA,GAASE,SAAAA;AACb;AAEA;;AAEC,IACM,SAASC,SAAAA,GAAAA;AACZ,IAAA,IAAIH,MAAAA,EAAQ;QACR,OAAOA,MAAAA;AACX,IAAA;;AAGA,oCACA,OAAO;AACHI,QAAAA,KAAAA,EAAO,CAACC,OAAAA,EAAiB,GAAGC,OAAgBC,OAAAA,CAAQH,KAAK,CAACC,OAAAA,EAAAA,GAAYC,IAAAA,CAAAA;AACtEE,QAAAA,IAAAA,EAAM,CAACH,OAAAA,EAAiB,GAAGC,OAAgBC,OAAAA,CAAQC,IAAI,CAACH,OAAAA,EAAAA,GAAYC,IAAAA,CAAAA;AACpEG,QAAAA,IAAAA,EAAM,CAACJ,OAAAA,EAAiB,GAAGC,OAAgBC,OAAAA,CAAQG,GAAG,CAACL,OAAAA,EAAAA,GAAYC,IAAAA,CAAAA;AACnEK,QAAAA,KAAAA,EAAO,CAACN,OAAAA,EAAiB,GAAGC,OAAgBC,OAAAA,CAAQI,KAAK,CAACN,OAAAA,EAAAA,GAAYC,IAAAA;AAC1E,KAAA;AACA,+BACJ;;AC1BA;;;;AAIC,IACM,eAAeM,SAAAA,CAClBC,OAAe,EACfC,MAAoC,EAAA;AAEpC,IAAA,MAAMd,MAAAA,GAASG,SAAAA,EAAAA;AAEf,IAAA,IAAK,IAAIY,CAAAA,GAAIF,OAAAA,EAASE,CAAAA,GAAI,GAAGA,CAAAA,EAAAA,CAAK;AAC9Bf,QAAAA,MAAAA,CAAOS,IAAI,CAAC,CAAC,aAAa,EAAEM,CAAAA,CAAE,GAAG,CAAC,CAAA;AAElC,QAAA,IAAID,MAAAA,EAAQ;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OAAO8C,IAAI;AAC9BjF,QAAAA,MAAAA,CAAOS,IAAI,CAAC,wBAAA,CAAA;QACZ,OAAOuE,UAAAA;AACX,IAAA,CAAA,CAAE,OAAO5E,KAAAA,EAAO;QACZJ,MAAAA,CAAOI,KAAK,CAAC,uBAAA,EAAyBA,KAAAA,CAAAA;AACtC,QAAA,MAAM,IAAIiC,KAAAA,CAAM,CAAC,sBAAsB,EAAEjC,KAAAA,CAAAA,CAAO,CAAA;AACpD,IAAA;AACJ;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/countdown.ts","../src/devices.ts","../src/recording.ts","../src/transcription.ts"],"sourcesContent":["#!/usr/bin/env node\n\n/**\n * Countdown timer utility for audio recording sessions\n * Provides a visual countdown with beep warnings and color changes\n */\n\nexport interface CountdownOptions {\n /** Duration in seconds */\n durationSeconds: number;\n /** Show beep warning at 30 seconds remaining */\n beepAt30Seconds?: boolean;\n /** Change color to red at 30 seconds remaining */\n redAt30Seconds?: boolean;\n /** Callback function called every second with remaining time */\n onTick?: (remainingSeconds: number) => void;\n /** Callback function called when countdown reaches zero */\n onComplete?: () => void;\n /** Whether to clear the countdown line when finished */\n clearOnComplete?: boolean;\n}\n\n/**\n * ANSI escape codes for terminal control\n */\nconst ANSI = {\n // Cursor movement\n CURSOR_UP: '\\x1b[1A',\n CURSOR_TO_START: '\\x1b[0G',\n CLEAR_LINE: '\\x1b[2K',\n\n // Colors\n RED: '\\x1b[31m',\n GREEN: '\\x1b[32m',\n YELLOW: '\\x1b[33m',\n BLUE: '\\x1b[34m',\n MAGENTA: '\\x1b[35m',\n CYAN: '\\x1b[36m',\n WHITE: '\\x1b[37m',\n RESET: '\\x1b[0m',\n\n // Text styles\n BOLD: '\\x1b[1m',\n DIM: '\\x1b[2m'\n} as const;\n\n/**\n * Format seconds into MM:SS format\n */\nfunction formatTime(seconds: number): string {\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = seconds % 60;\n return `${minutes.toString().padStart(2, '0')}:${remainingSeconds.toString().padStart(2, '0')}`;\n}\n\n/**\n * Generate a beep sound using process.stdout.write with ASCII bell character\n */\nfunction beep(): void {\n process.stdout.write('\\x07'); // ASCII bell character\n}\n\n/**\n * Check if terminal supports colors and cursor movement\n */\nfunction supportsAnsi(): boolean {\n return process.stdout.isTTY &&\n process.env.TERM !== 'dumb' &&\n !process.env.NO_COLOR;\n}\n\n/**\n * Display a live countdown timer that updates in place\n */\nexport class CountdownTimer {\n private options: Required<CountdownOptions>;\n private intervalId: NodeJS.Timeout | null = null;\n private currentSeconds: number;\n private hasBeepedAt30: boolean = false;\n private isFirstDisplay: boolean = true;\n private supportsAnsi: boolean;\n private cleanupHandlers: Array<() => void> = [];\n private isDestroyed = false;\n\n constructor(options: CountdownOptions) {\n this.options = {\n beepAt30Seconds: true,\n redAt30Seconds: true,\n onTick: () => {},\n onComplete: () => {},\n clearOnComplete: false,\n ...options\n };\n this.currentSeconds = this.options.durationSeconds;\n this.supportsAnsi = supportsAnsi();\n\n // Set up cleanup handlers for process termination\n this.setupCleanupHandlers();\n }\n\n /**\n * Start the countdown timer\n */\n start(): Promise<void> {\n return new Promise((resolve) => {\n // Handle zero seconds case\n if (this.currentSeconds <= 0) {\n this.options.onComplete();\n resolve();\n return;\n }\n\n // Display initial countdown\n this.displayCountdown();\n\n this.intervalId = setInterval(() => {\n // Check if destroyed before processing\n if (this.isDestroyed) {\n clearInterval(this.intervalId!);\n resolve();\n return;\n }\n\n this.currentSeconds--;\n\n // Check for beep warning\n if (this.options.beepAt30Seconds &&\n this.currentSeconds === 30 &&\n !this.hasBeepedAt30) {\n beep();\n this.hasBeepedAt30 = true;\n }\n\n // Call tick callback\n this.options.onTick(this.currentSeconds);\n\n if (this.currentSeconds <= 0) {\n this.stop();\n this.options.onComplete();\n resolve();\n } else {\n this.displayCountdown();\n }\n }, 1000);\n });\n }\n\n /**\n * Stop the countdown timer\n */\n stop(): void {\n if (this.isDestroyed) {\n return;\n }\n\n if (this.intervalId) {\n clearInterval(this.intervalId);\n this.intervalId = null;\n }\n\n if (this.options.clearOnComplete && this.supportsAnsi) {\n // Clear the countdown line\n process.stdout.write(ANSI.CURSOR_TO_START + ANSI.CLEAR_LINE);\n } else if (!this.isFirstDisplay) {\n // Add a newline if we've been updating in place\n process.stdout.write('\\n');\n }\n }\n\n /**\n * Get current remaining time\n */\n getRemainingSeconds(): number {\n return this.currentSeconds;\n }\n\n /**\n * Display the countdown timer\n */\n private displayCountdown(): void {\n const timeString = formatTime(this.currentSeconds);\n const isWarningTime = this.currentSeconds <= 30;\n\n let output: string;\n\n if (this.supportsAnsi) {\n // Use colors and in-place updating if supported\n if (!this.isFirstDisplay) {\n // Move cursor up and clear the line to overwrite previous countdown\n process.stdout.write(ANSI.CURSOR_UP + ANSI.CURSOR_TO_START + ANSI.CLEAR_LINE);\n }\n\n const color = isWarningTime && this.options.redAt30Seconds ? ANSI.RED : ANSI.CYAN;\n const style = isWarningTime ? ANSI.BOLD : '';\n\n output = `${color}${style}⏱️ Recording time remaining: ${timeString}${ANSI.RESET}`;\n } else {\n // Fallback for terminals that don't support ANSI\n const warning = isWarningTime ? ' ⚠️ ' : '';\n output = `⏱️ Recording time remaining: ${timeString}${warning}`;\n }\n\n process.stdout.write(output + '\\n');\n this.isFirstDisplay = false;\n }\n\n /**\n * Set up cleanup handlers for process termination and uncaught exceptions\n */\n private setupCleanupHandlers(): void {\n // Skip setting up process listeners in test environments to avoid listener leaks\n if (process.env.NODE_ENV === 'test' || process.env.VITEST) {\n return;\n }\n\n const cleanup = () => {\n this.destroy();\n };\n\n // Handle various exit scenarios\n const exitHandler = () => cleanup();\n const uncaughtExceptionHandler = (error: Error) => {\n cleanup();\n // Re-throw to maintain normal error handling\n throw error;\n };\n\n process.on('exit', exitHandler);\n process.on('SIGINT', exitHandler);\n process.on('SIGTERM', exitHandler);\n process.on('uncaughtException', uncaughtExceptionHandler);\n process.on('unhandledRejection', cleanup);\n\n // Store handlers for removal during destroy\n this.cleanupHandlers = [\n () => process.removeListener('exit', exitHandler),\n () => process.removeListener('SIGINT', exitHandler),\n () => process.removeListener('SIGTERM', exitHandler),\n () => process.removeListener('uncaughtException', uncaughtExceptionHandler),\n () => process.removeListener('unhandledRejection', cleanup)\n ];\n }\n\n /**\n * Destroy the timer and clean up all resources\n */\n destroy(): void {\n if (this.isDestroyed) {\n return;\n }\n\n this.isDestroyed = true;\n this.stop();\n\n // Remove all process event listeners\n this.cleanupHandlers.forEach(handler => {\n try {\n handler();\n } catch {\n // Ignore errors during cleanup\n }\n });\n this.cleanupHandlers = [];\n }\n\n /**\n * Check if the timer has been destroyed\n */\n isTimerDestroyed(): boolean {\n return this.isDestroyed;\n }\n}\n\n/**\n * Create and start a countdown timer (convenience function)\n */\nexport async function startCountdown(options: CountdownOptions): Promise<void> {\n const timer = new CountdownTimer(options);\n return timer.start();\n}\n\n/**\n * Create a countdown timer for audio recording with sensible defaults\n */\nexport function createAudioRecordingCountdown(durationSeconds: number): CountdownTimer {\n return new CountdownTimer({\n durationSeconds,\n beepAt30Seconds: true,\n redAt30Seconds: true,\n clearOnComplete: true\n });\n}\n\n/**\n * Simple countdown function for backwards compatibility\n * @param seconds Number of seconds to count down\n * @param onTick Optional callback called on each tick\n * @deprecated Use CountdownTimer or startCountdown for more features\n */\nexport async function countdown(\n seconds: number,\n onTick?: (remaining: number) => void\n): Promise<void> {\n const options: CountdownOptions = {\n durationSeconds: seconds,\n beepAt30Seconds: false,\n redAt30Seconds: false,\n clearOnComplete: false\n };\n\n if (onTick) {\n options.onTick = onTick;\n }\n\n await startCountdown(options);\n}\n","/**\n * Audio device detection and selection\n */\n\nimport { selectAndConfigureAudioDevice } from '@theunwalked/unplayable';\nimport { homedir } from 'os';\nimport { join } from 'path';\nimport { getLogger } from '@eldrforge/shared';\nimport type { AudioDevice } from './types';\n\n/**\n * List all available audio input devices\n * Note: This is a placeholder - @theunwalked/unplayable doesn't provide a direct API for this\n * In practice, you would use selectAndConfigureAudioDevice for device selection\n */\nexport async function listAudioDevices(): Promise<AudioDevice[]> {\n const logger = getLogger();\n\n // This would require extending @theunwalked/unplayable or using a different library\n logger.warn('listAudioDevices is not fully implemented - use selectDeviceInteractive instead');\n return [];\n}\n\n/**\n * Get the default audio input device\n */\nexport async function getDefaultDevice(): Promise<AudioDevice | null> {\n const devices = await listAudioDevices();\n return devices.find((d) => d.isDefault) || devices[0] || null;\n}\n\n/**\n * Find device by ID or name\n */\nexport async function findDevice(idOrName: string): Promise<AudioDevice | null> {\n const devices = await listAudioDevices();\n\n return (\n devices.find((d) => d.id === idOrName) ||\n devices.find((d) => d.name === idOrName) ||\n null\n );\n}\n\n/**\n * Interactive device selection using @theunwalked/unplayable\n * This function uses the built-in interactive device selector\n */\nexport async function selectDeviceInteractive(): Promise<string> {\n const logger = getLogger();\n\n try {\n const preferencesDir = join(homedir(), '.unplayable');\n const result = await selectAndConfigureAudioDevice(preferencesDir, logger, false);\n return result;\n } catch (error) {\n logger.error('Device selection failed:', error);\n throw new Error(`Device selection failed: ${error}`);\n }\n}\n\n","/**\n * Audio recording functionality\n */\n\nimport { processAudio } from '@theunwalked/unplayable';\nimport { promises as fs } from 'fs';\nimport { join } from 'path';\nimport { getLogger } from '@eldrforge/shared';\nimport type { RecordingOptions, RecordingResult } from './types';\n\n/**\n * Record audio using @theunwalked/unplayable\n */\nexport async function recordAudio(\n options: RecordingOptions = {}\n): Promise<RecordingResult> {\n const logger = getLogger();\n\n const {\n duration,\n outputPath,\n } = options;\n\n const startTime = Date.now();\n\n try {\n logger.info('Starting audio recording...');\n logger.info('Press ENTER to stop recording');\n\n const audioResult = await processAudio({\n file: undefined,\n maxRecordingTime: duration,\n outputDirectory: outputPath ? outputPath.substring(0, outputPath.lastIndexOf('/')) : 'output',\n debug: false\n });\n\n if (audioResult.cancelled) {\n throw new Error('Recording cancelled by user');\n }\n\n const endTime = Date.now();\n const actualDuration = (endTime - startTime) / 1000;\n\n // Get file stats\n const filePath = audioResult.audioFilePath || join('output', `recording-${Date.now()}.wav`);\n const stats = await fs.stat(filePath);\n\n logger.info(`Recording complete: ${filePath}`);\n logger.info(`Duration: ${actualDuration.toFixed(2)} seconds`);\n logger.info(`File size: ${(stats.size / 1024).toFixed(2)} KB`);\n\n return {\n filePath,\n duration: actualDuration,\n fileSize: stats.size,\n };\n } catch (error) {\n logger.error('Recording failed:', error);\n throw new Error(`Recording failed: ${error}`);\n }\n}\n\n/**\n * Get timestamped filename for archiving\n */\nfunction getTimestampedFilename(baseName: string, extension: string = '.json'): string {\n const now = new Date();\n\n // Format as YYMMdd-HHmm (e.g., 250701-1030)\n const yy = now.getFullYear().toString().slice(-2);\n const mm = (now.getMonth() + 1).toString().padStart(2, '0');\n const dd = now.getDate().toString().padStart(2, '0');\n const hh = now.getHours().toString().padStart(2, '0');\n const min = now.getMinutes().toString().padStart(2, '0');\n\n const timestamp = `${yy}${mm}${dd}-${hh}${min}`;\n\n return `${timestamp}-${baseName}${extension}`;\n}\n\n/**\n * Get timestamped filename for archived audio\n */\nexport function getTimestampedArchivedAudioFilename(originalExtension: string = '.wav'): string {\n return getTimestampedFilename('review-audio', originalExtension);\n}\n\n/**\n * Get timestamped filename for archived transcript\n */\nexport function getTimestampedArchivedTranscriptFilename(): string {\n return getTimestampedFilename('review-transcript', '.md');\n}\n\n/**\n * Archive audio file with transcription to specified directory\n * This saves BOTH the audio file AND transcription text together\n * @param originalAudioPath Path to the original audio file\n * @param transcriptionText The transcribed text content\n * @param outputDirectory Directory to save archived files (default: 'output')\n * @returns Paths to both archived audio and transcript files\n */\nexport async function archiveAudio(\n originalAudioPath: string,\n transcriptionText: string,\n outputDirectory: string = 'output'\n): Promise<{ audioPath: string; transcriptPath: string }> {\n const logger = getLogger();\n const path = await import('path');\n\n try {\n // Ensure the output directory exists\n await fs.mkdir(outputDirectory, { recursive: true });\n\n // Get file extension from original audio file\n const originalExtension = path.extname(originalAudioPath);\n\n // Generate timestamped filenames\n const archivedAudioFilename = getTimestampedArchivedAudioFilename(originalExtension);\n const archivedTranscriptFilename = getTimestampedArchivedTranscriptFilename();\n\n // Full paths for archived files\n const archivedAudioPath = path.join(outputDirectory, archivedAudioFilename);\n const archivedTranscriptPath = path.join(outputDirectory, archivedTranscriptFilename);\n\n // Copy audio file if it exists\n try {\n await fs.access(originalAudioPath);\n const audioBuffer = await fs.readFile(originalAudioPath);\n await fs.writeFile(archivedAudioPath, audioBuffer);\n logger.debug('Archived audio file to: %s', archivedAudioPath);\n } catch {\n logger.warn('AUDIO_FILE_NOT_FOUND: Original audio file not accessible | Path: %s | Impact: Cannot archive original', originalAudioPath);\n }\n\n // Save transcription text\n const transcriptContent = `# Audio Transcription Archive\\n\\n**Original Audio File:** ${originalAudioPath}\\n**Archived:** ${new Date().toISOString()}\\n\\n## Transcription\\n\\n${transcriptionText}`;\n await fs.writeFile(archivedTranscriptPath, transcriptContent, 'utf8');\n logger.debug('Archived transcription to: %s', archivedTranscriptPath);\n\n logger.info('AUDIO_ARCHIVED: Audio and transcript archived successfully | Audio: %s | Transcript: %s | Status: archived', archivedAudioFilename, archivedTranscriptFilename);\n\n return {\n audioPath: archivedAudioPath,\n transcriptPath: archivedTranscriptPath\n };\n\n } catch (error: any) {\n logger.error('AUDIO_ARCHIVE_FAILED: Failed to archive audio files | Error: %s | Impact: Audio not preserved', error.message);\n throw new Error(`Audio archiving failed: ${error.message}`);\n }\n}\n\n/**\n * Delete audio file\n */\nexport async function deleteAudio(audioPath: string): Promise<void> {\n const logger = getLogger();\n\n try {\n await fs.unlink(audioPath);\n logger.debug(`Deleted audio file: ${audioPath}`);\n } catch (error: any) {\n if (error.code !== 'ENOENT') {\n logger.warn(`Failed to delete audio file: ${error}`);\n }\n }\n}\n\n/**\n * Get audio file duration (requires external library or audio analysis)\n * For now, returns null - can be enhanced later\n */\nexport async function getAudioDuration(_audioPath: string): Promise<number | null> {\n // TODO: Implement audio duration detection\n // May require additional library like 'music-metadata'\n return null;\n}\n\n","/**\n * Audio transcription utilities\n * Wraps @eldrforge/ai-service for convenience\n */\n\nimport { transcribeAudio as aiTranscribe } from '@eldrforge/ai-service';\nimport { getLogger } from '@eldrforge/shared';\n\n/**\n * Transcribe audio file using AI service\n * This is a convenience wrapper around @eldrforge/ai-service\n */\nexport async function transcribeAudio(audioPath: string): Promise<string> {\n const logger = getLogger();\n\n try {\n logger.info('Transcribing audio...');\n const result = await aiTranscribe(audioPath);\n const transcript = result.text;\n logger.info('Transcription complete');\n return transcript;\n } catch (error) {\n logger.error('Transcription failed:', error);\n throw new Error(`Transcription failed: ${error}`);\n }\n}\n\n"],"names":["ANSI","CURSOR_UP","CURSOR_TO_START","CLEAR_LINE","RED","CYAN","RESET","BOLD","formatTime","seconds","minutes","Math","floor","remainingSeconds","toString","padStart","beep","process","stdout","write","supportsAnsi","isTTY","env","TERM","NO_COLOR","CountdownTimer","start","Promise","resolve","currentSeconds","options","onComplete","displayCountdown","intervalId","setInterval","isDestroyed","clearInterval","beepAt30Seconds","hasBeepedAt30","onTick","stop","clearOnComplete","isFirstDisplay","getRemainingSeconds","timeString","isWarningTime","output","color","redAt30Seconds","style","warning","setupCleanupHandlers","NODE_ENV","VITEST","cleanup","destroy","exitHandler","uncaughtExceptionHandler","error","on","cleanupHandlers","removeListener","forEach","handler","isTimerDestroyed","durationSeconds","startCountdown","timer","createAudioRecordingCountdown","countdown","listAudioDevices","logger","getLogger","warn","getDefaultDevice","devices","find","d","isDefault","findDevice","idOrName","id","name","selectDeviceInteractive","preferencesDir","join","homedir","result","selectAndConfigureAudioDevice","Error","recordAudio","duration","outputPath","startTime","Date","now","info","audioResult","processAudio","file","undefined","maxRecordingTime","outputDirectory","substring","lastIndexOf","debug","cancelled","endTime","actualDuration","filePath","audioFilePath","stats","fs","stat","toFixed","size","fileSize","getTimestampedFilename","baseName","extension","yy","getFullYear","slice","mm","getMonth","dd","getDate","hh","getHours","min","getMinutes","timestamp","getTimestampedArchivedAudioFilename","originalExtension","getTimestampedArchivedTranscriptFilename","archiveAudio","originalAudioPath","transcriptionText","path","mkdir","recursive","extname","archivedAudioFilename","archivedTranscriptFilename","archivedAudioPath","archivedTranscriptPath","access","audioBuffer","readFile","writeFile","transcriptContent","toISOString","audioPath","transcriptPath","message","deleteAudio","unlink","code","getAudioDuration","_audioPath","transcribeAudio","aiTranscribe","transcript","text"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA;;AAEC,IACD,MAAMA,IAAAA,GAAO;;IAETC,SAAAA,EAAW,SAAA;IACXC,eAAAA,EAAiB,SAAA;IACjBC,UAAAA,EAAY,SAAA;;IAGZC,GAAAA,EAAK,UAAA;IAKLC,IAAAA,EAAM,UAAA;IAENC,KAAAA,EAAO,SAAA;;IAGPC,IAAAA,EAAM,SAEV,CAAA;AAEA;;IAGA,SAASC,WAAWC,OAAe,EAAA;AAC/B,IAAA,MAAMC,OAAAA,GAAUC,IAAAA,CAAKC,KAAK,CAACH,OAAAA,GAAU,EAAA,CAAA;AACrC,IAAA,MAAMI,mBAAmBJ,OAAAA,GAAU,EAAA;AACnC,IAAA,OAAO,GAAGC,OAAAA,CAAQI,QAAQ,EAAA,CAAGC,QAAQ,CAAC,CAAA,EAAG,GAAA,CAAA,CAAK,CAAC,EAAEF,iBAAiBC,QAAQ,EAAA,CAAGC,QAAQ,CAAC,GAAG,GAAA,CAAA,CAAA,CAAM;AACnG;AAEA;;AAEC,IACD,SAASC,IAAAA,GAAAA;AACLC,IAAAA,OAAAA,CAAQC,MAAM,CAACC,KAAK,CAAC;AACzB;AAEA;;AAEC,IACD,SAASC,YAAAA,GAAAA;AACL,IAAA,OAAOH,OAAAA,CAAQC,MAAM,CAACG,KAAK,IACpBJ,OAAAA,CAAQK,GAAG,CAACC,IAAI,KAAK,MAAA,IACrB,CAACN,OAAAA,CAAQK,GAAG,CAACE,QAAQ;AAChC;AAEA;;AAEC,IACM,MAAMC,cAAAA,CAAAA;AA0BT;;AAEC,QACDC,KAAAA,GAAuB;QACnB,OAAO,IAAIC,QAAQ,CAACC,OAAAA,GAAAA;;AAEhB,YAAA,IAAI,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A,CAAAA,CAAW,CAAA;AACnD,IAAA,CAAA,CAAE,OAAO9F,KAAAA,EAAY;QACjB,IAAIA,KAAAA,CAAMmG,IAAI,KAAK,QAAA,EAAU;AACzBtF,YAAAA,MAAAA,CAAOE,IAAI,CAAC,CAAC,6BAA6B,EAAEf,KAAAA,CAAAA,CAAO,CAAA;AACvD,QAAA;AACJ,IAAA;AACJ;AAEA;;;IAIO,eAAeoG,gBAAAA,CAAiBC,UAAkB,EAAA;;;IAGrD,OAAO,IAAA;AACX;;ACzKA;;;IAIO,eAAeC,eAAAA,CAAgBR,SAAiB,EAAA;AACnD,IAAA,MAAMjF,MAAAA,GAASC,SAAAA,EAAAA;IAEf,IAAI;AACAD,QAAAA,MAAAA,CAAOyB,IAAI,CAAC,uBAAA,CAAA;QACZ,MAAMT,MAAAA,GAAS,MAAM0E,iBAAAA,CAAaT,SAAAA,CAAAA;QAClC,MAAMU,UAAAA,GAAa3E,OAAO4E,IAAI;AAC9B5F,QAAAA,MAAAA,CAAOyB,IAAI,CAAC,wBAAA,CAAA;QACZ,OAAOkE,UAAAA;AACX,IAAA,CAAA,CAAE,OAAOxG,KAAAA,EAAO;QACZa,MAAAA,CAAOb,KAAK,CAAC,uBAAA,EAAyBA,KAAAA,CAAAA;AACtC,QAAA,MAAM,IAAI+B,KAAAA,CAAM,CAAC,sBAAsB,EAAE/B,KAAAA,CAAAA,CAAO,CAAA;AACpD,IAAA;AACJ;;;;"}
@@ -1,10 +1,77 @@
1
+ #!/usr/bin/env node
1
2
  /**
2
- * Countdown timer for audio recording
3
+ * Countdown timer utility for audio recording sessions
4
+ * Provides a visual countdown with beep warnings and color changes
3
5
  */
6
+ export interface CountdownOptions {
7
+ /** Duration in seconds */
8
+ durationSeconds: number;
9
+ /** Show beep warning at 30 seconds remaining */
10
+ beepAt30Seconds?: boolean;
11
+ /** Change color to red at 30 seconds remaining */
12
+ redAt30Seconds?: boolean;
13
+ /** Callback function called every second with remaining time */
14
+ onTick?: (remainingSeconds: number) => void;
15
+ /** Callback function called when countdown reaches zero */
16
+ onComplete?: () => void;
17
+ /** Whether to clear the countdown line when finished */
18
+ clearOnComplete?: boolean;
19
+ }
4
20
  /**
5
- * Display countdown before recording
21
+ * Display a live countdown timer that updates in place
22
+ */
23
+ export declare class CountdownTimer {
24
+ private options;
25
+ private intervalId;
26
+ private currentSeconds;
27
+ private hasBeepedAt30;
28
+ private isFirstDisplay;
29
+ private supportsAnsi;
30
+ private cleanupHandlers;
31
+ private isDestroyed;
32
+ constructor(options: CountdownOptions);
33
+ /**
34
+ * Start the countdown timer
35
+ */
36
+ start(): Promise<void>;
37
+ /**
38
+ * Stop the countdown timer
39
+ */
40
+ stop(): void;
41
+ /**
42
+ * Get current remaining time
43
+ */
44
+ getRemainingSeconds(): number;
45
+ /**
46
+ * Display the countdown timer
47
+ */
48
+ private displayCountdown;
49
+ /**
50
+ * Set up cleanup handlers for process termination and uncaught exceptions
51
+ */
52
+ private setupCleanupHandlers;
53
+ /**
54
+ * Destroy the timer and clean up all resources
55
+ */
56
+ destroy(): void;
57
+ /**
58
+ * Check if the timer has been destroyed
59
+ */
60
+ isTimerDestroyed(): boolean;
61
+ }
62
+ /**
63
+ * Create and start a countdown timer (convenience function)
64
+ */
65
+ export declare function startCountdown(options: CountdownOptions): Promise<void>;
66
+ /**
67
+ * Create a countdown timer for audio recording with sensible defaults
68
+ */
69
+ export declare function createAudioRecordingCountdown(durationSeconds: number): CountdownTimer;
70
+ /**
71
+ * Simple countdown function for backwards compatibility
6
72
  * @param seconds Number of seconds to count down
7
73
  * @param onTick Optional callback called on each tick
74
+ * @deprecated Use CountdownTimer or startCountdown for more features
8
75
  */
9
76
  export declare function countdown(seconds: number, onTick?: (remaining: number) => void): Promise<void>;
10
77
  //# sourceMappingURL=countdown.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"countdown.d.ts","sourceRoot":"","sources":["../../src/countdown.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;;;GAIG;AACH,wB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B,cAAc,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAG7E;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,eAAe,EAAE,MAAM,GAAG,cAAc,CAOrF;AAED;;;;;GAKG;AACH,wBAAsB,SAAS,CAC3B,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,GACrC,OAAO,CAAC,IAAI,CAAC,CAaf"}
@@ -3,9 +3,10 @@
3
3
  * Audio recording tools for voice-driven development workflows
4
4
  */
5
5
  export * from './types';
6
- export { setLogger, getLogger } from './logger';
7
- export { countdown } from './countdown';
6
+ export { setLogger, getLogger, type Logger } from '@eldrforge/shared';
7
+ export { countdown, CountdownTimer, startCountdown, createAudioRecordingCountdown } from './countdown';
8
+ export type { CountdownOptions } from './countdown';
8
9
  export { listAudioDevices, getDefaultDevice, findDevice, selectDeviceInteractive, } from './devices';
9
- export { recordAudio, archiveAudio, deleteAudio, getAudioDuration, } from './recording';
10
+ export { recordAudio, archiveAudio, deleteAudio, getAudioDuration, getTimestampedArchivedAudioFilename, getTimestampedArchivedTranscriptFilename, } from './recording';
10
11
  export { transcribeAudio } from './transcription';
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EACH,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,uBAAuB,GAC1B,MAAM,WAAW,CAAC;AAGnB,OAAO,EACH,WAAW,EACX,YAAY,EACZ,WAAW,EACX,gBAAgB,GACnB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGtE,OAAO,EACH,SAAS,EACT,cAAc,EACd,cAAc,EACd,6BAA6B,EAChC,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD,OAAO,EACH,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,EACV,uBAAuB,GAC1B,MAAM,WAAW,CAAC;AAGnB,OAAO,EACH,WAAW,EACX,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,mCAAmC,EACnC,wCAAwC,GAC3C,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
@@ -4,9 +4,25 @@ import { RecordingOptions, RecordingResult } from './types';
4
4
  */
5
5
  export declare function recordAudio(options?: RecordingOptions): Promise<RecordingResult>;
6
6
  /**
7
- * Archive audio file to specified directory
7
+ * Get timestamped filename for archived audio
8
8
  */
9
- export declare function archiveAudio(audioPath: string, archiveDir: string, filename?: string): Promise<string>;
9
+ export declare function getTimestampedArchivedAudioFilename(originalExtension?: string): string;
10
+ /**
11
+ * Get timestamped filename for archived transcript
12
+ */
13
+ export declare function getTimestampedArchivedTranscriptFilename(): string;
14
+ /**
15
+ * Archive audio file with transcription to specified directory
16
+ * This saves BOTH the audio file AND transcription text together
17
+ * @param originalAudioPath Path to the original audio file
18
+ * @param transcriptionText The transcribed text content
19
+ * @param outputDirectory Directory to save archived files (default: 'output')
20
+ * @returns Paths to both archived audio and transcript files
21
+ */
22
+ export declare function archiveAudio(originalAudioPath: string, transcriptionText: string, outputDirectory?: string): Promise<{
23
+ audioPath: string;
24
+ transcriptPath: string;
25
+ }>;
10
26
  /**
11
27
  * Delete audio file
12
28
  */
@@ -1 +1 @@
1
- {"version":3,"file":"recording.d.ts","sourceRoot":"","sources":["../../src/recording.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEjE;;GAEG;AACH,wBAAsB,WAAW,CAC7B,OAAO,GAAE,gBAAqB,GAC/B,OAAO,CAAC,eAAe,CAAC,CA6C1B;AAED;;GAEG;AACH,wBAAsB,YAAY,CAC9B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC,CAoBjB;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAWlE;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAIjF"}
1
+ {"version":3,"file":"recording.d.ts","sourceRoot":"","sources":["../../src/recording.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEjE;;GAEG;AACH,wBAAsB,WAAW,CAC7B,OAAO,GAAE,gBAAqB,GAC/B,OAAO,CAAC,eAAe,CAAC,CA6C1B;AAoBD;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,iBAAiB,GAAE,MAAe,GAAG,MAAM,CAE9F;AAED;;GAEG;AACH,wBAAgB,wCAAwC,IAAI,MAAM,CAEjE;AAED;;;;;;;GAOG;AACH,wBAAsB,YAAY,CAC9B,iBAAiB,EAAE,MAAM,EACzB,iBAAiB,EAAE,MAAM,EACzB,eAAe,GAAE,MAAiB,GACnC,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,CAAC,CA6CxD;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAWlE;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAIjF"}
@@ -28,10 +28,4 @@ export interface RecordingResult {
28
28
  /** File size in bytes */
29
29
  fileSize: number;
30
30
  }
31
- export interface Logger {
32
- error: (message: string, ...args: any[]) => void;
33
- warn: (message: string, ...args: any[]) => void;
34
- info: (message: string, ...args: any[]) => void;
35
- debug: (message: string, ...args: any[]) => void;
36
- }
37
31
  //# sourceMappingURL=types.d.ts.map