Use project bearer for transcription proxy
This commit is contained in:
parent
ba861959bd
commit
c61345a89d
@ -98,12 +98,13 @@ async function transcribeAudioFile(audioFile) {
|
||||
|
||||
const headers = {};
|
||||
|
||||
if (transcriptionApiKey) {
|
||||
headers.Authorization = `Bearer ${transcriptionApiKey}`;
|
||||
if (process.env.PROJECT_UUID) {
|
||||
headers.Authorization = `Bearer ${process.env.PROJECT_UUID}`;
|
||||
headers["project-uuid"] = process.env.PROJECT_UUID;
|
||||
}
|
||||
|
||||
if (process.env.PROJECT_UUID) {
|
||||
headers["project-uuid"] = process.env.PROJECT_UUID;
|
||||
if (transcriptionApiKey) {
|
||||
headers.Authorization = `Bearer ${transcriptionApiKey}`;
|
||||
}
|
||||
|
||||
const response = await fetch(transcriptionUrl, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user