mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:21:10 +02:00
fix(memoro/audio-server): resolve TypeScript errors
- tsconfig: add allowImportingTsExtensions for .ts import paths (Bun pattern) - transcription: cast Azure response.json() to typed parameter via Parameters<> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
62597707b3
commit
8a7efdd654
2 changed files with 2 additions and 1 deletions
|
|
@ -247,7 +247,7 @@ export class TranscriptionService {
|
||||||
throw new Error(`Azure Speech API error: ${response.status} - ${errorText}`);
|
throw new Error(`Azure Speech API error: ${response.status} - ${errorText}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const azureResult = await response.json();
|
const azureResult = (await response.json()) as Parameters<typeof this.processTranscriptionResult>[0];
|
||||||
console.log(`[Azure] Transcription response received from ${speechService.name}`);
|
console.log(`[Azure] Transcription response received from ${speechService.name}`);
|
||||||
console.log(`[Azure] Phrase count: ${azureResult?.phrases?.length ?? 0}`);
|
console.log(`[Azure] Phrase count: ${azureResult?.phrases?.length ?? 0}`);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
|
"allowImportingTsExtensions": true,
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"types": ["bun-types", "node"]
|
"types": ["bun-types", "node"]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue