Skip to content

Commit

Permalink
Fixed error in ASR parameter handling.
Browse files Browse the repository at this point in the history
Current version missing `?` in url constructor. Added additional logging.
  • Loading branch information
dahifi authored Oct 8, 2023
1 parent 17c8e69 commit e019f0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/transcribe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,16 @@ export class TranscriptionEngine {
if (this.settings.language != "auto")
args += `&language=${this.settings.language}`;

const url = `${this.settings.whisperASRUrl}/asr?${args}`;
console.log("URL:", url);

const options: RequestUrlParam = {
method: "POST",
url: `${this.settings.whisperASRUrl}/asr${args}`,
url: url,
contentType: `multipart/form-data; boundary=----${boundary_string}`,
body: request_body,
};
console.log("Options:", options);

return requestUrl(options)
.then(async (response) => {
Expand Down

0 comments on commit e019f0e

Please sign in to comment.