chore: pass prev aggregated transcription for better results
This commit is contained in:
parent
688a8409ea
commit
85cc7beaf9
1 changed files with 4 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ export class AmicalCloudProvider implements TranscriptionProvider {
|
|||
private currentLanguage: string | undefined;
|
||||
private currentAccessibilityContext: GetAccessibilityContextResult | null =
|
||||
null;
|
||||
private currentAggregatedTranscription: string | undefined;
|
||||
|
||||
// Configuration
|
||||
private readonly FRAME_SIZE = 512; // 32ms at 16kHz
|
||||
|
|
@ -65,6 +66,8 @@ export class AmicalCloudProvider implements TranscriptionProvider {
|
|||
// Store accessibility context for the API request
|
||||
this.currentAccessibilityContext = context?.accessibilityContext ?? null;
|
||||
|
||||
this.currentAggregatedTranscription = context?.aggregatedTranscription;
|
||||
|
||||
// Check authentication
|
||||
if (!(await this.authService.isAuthenticated())) {
|
||||
throw new Error("Authentication required for cloud transcription");
|
||||
|
|
@ -174,6 +177,7 @@ export class AmicalCloudProvider implements TranscriptionProvider {
|
|||
body: JSON.stringify({
|
||||
audioData: Array.from(audioData),
|
||||
language: this.currentLanguage,
|
||||
previousTranscription: this.currentAggregatedTranscription,
|
||||
formatting: {
|
||||
enabled: enableFormatting,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue