mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
e7e97a7f60
- Add assembly.ts module for REST API transcription via AssemblyAI
- Implement 5-step pipeline: upload → create job → poll status → download → save
- Enable speaker_labels for diarization (Speaker A, B, C...)
- Add millisecond-precision timestamps for each utterance
- Store JSON transcripts in storage/transcripts/{session_id}.json
- Add axios, dotenv dependencies
- Add transcribeLatest.ts helper for quick testing
User Story: S2-02b - Externe Transkription per REST API
15 lines
424 B
JavaScript
15 lines
424 B
JavaScript
import 'dotenv/config';
|
|
import assemblyModule from './assembly.ts';
|
|
|
|
// Test: URL passed as argument OR local file ./storage/audio/test.wav
|
|
const audioPath = process.argv[2] || './storage/audio/test.wav';
|
|
|
|
assemblyModule.run(audioPath)
|
|
.then(result => {
|
|
console.log('✅ Success!');
|
|
console.log('Transcript ID:', result.id);
|
|
})
|
|
.catch(error => {
|
|
console.error('❌ Error:', error?.message || error);
|
|
});
|