assemblyai-node-sdk icon indicating copy to clipboard operation
assemblyai-node-sdk copied to clipboard

EU transcribe/submit - polling not working

Open underthecocotree opened this issue 10 months ago • 0 comments

When using the eu baseUrl the file is queued and processed in the EU server. It can complete but the transcribe or the submit don't seem to work as expected. I think that the polling is not taking the baesUrl into consideration.

When the baseUrl is left to the default then everything seems to be processing correctly.

    this.client = new AssemblyAI({
      apiKey: process.env.ASSEMBLYAI_API_KEY as string,
      // baseUrl:  'https://api.eu.assemblyai.com'
    });

// ...
// ...
  async transcribe(audioUrl: string): Promise<Transcript> {
    const transcript = await this.client.transcripts.transcribe({
      ...this.data,
      audio: audioUrl
    });

    if (transcript.status === 'error') {
      console.log("ERR: Unable to transcribe: " + transcript.error );
      // throw new Error("Unable to transcribe: " + transcript.error );
    }

    return transcript;
  }

underthecocotree avatar Mar 11 '25 23:03 underthecocotree