toeverything/AFFiNE · error · CopilotTranscriptionAudioNotProvided

copilot_transcription_audio_not_provided

copilot_transcription_audio_not_provided

Error message

Audio not provided.

What it means

submitTranscriptTask requires at least one audio blob upload; when blob/blobs/input all resolve to nothing the resolver throws an 'Audio not provided.' bad-request error before creating a transcription job.

Source

Thrown at packages/backend/server/src/plugins/copilot/transcript/resolver.ts:347

    @Args({ name: 'blob', type: () => GraphQLUpload, nullable: true })
    blob: FileUpload | null,
    @Args({ name: 'blobs', type: () => [GraphQLUpload], nullable: true })
    blobs: FileUpload[] | null,
    @Args({
      name: 'input',
      type: () => SubmitAudioTranscriptionInput,
      nullable: true,
    })
    input: SubmitAudioTranscriptionInput | null
  ): Promise<TranscriptionResultType | null> {
    await this.ac
      .user(user.id)
      .workspace(workspaceId)
      .allowLocal()
      .assert('Workspace.Copilot');
    const allBlobs = blob ? [blob, ...(blobs || [])].filter(v => !!v) : blobs;
    if (!allBlobs || allBlobs.length === 0) {
      throw new CopilotTranscriptionAudioNotProvided();
    }

    const task = await this.transcript.submitTask(
      user.id,
      workspaceId,
      blobId,
      // oxlint-disable-next-line typescript/await-thenable
      await Promise.all(allBlobs),
      input ?? undefined
    );

    return this.handleJobResult(task);
  }

  @Mutation(() => TranscriptionResultType, { nullable: true })
  async retryTranscriptTask(
    @CurrentUser() user: CurrentUser,
    @Args('workspaceId') workspaceId: string,

View on GitHub (pinned to b4c8548c09)

Solutions

  1. Attach an audio blob to the transcription request before submitting.
  2. Verify the audio upload completed and its blob id is passed to the resolver.
  3. Check the client code path that records audio to ensure it produces a non-empty file.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/backend/server/src/plugins/copilot/transcript/resolver.ts:347 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18). Data as JSON: /api/errors/7f421b5e194bb21d. Report an issue: GitHub.