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 = {};
|
const headers = {};
|
||||||
|
|
||||||
if (transcriptionApiKey) {
|
if (process.env.PROJECT_UUID) {
|
||||||
headers.Authorization = `Bearer ${transcriptionApiKey}`;
|
headers.Authorization = `Bearer ${process.env.PROJECT_UUID}`;
|
||||||
|
headers["project-uuid"] = process.env.PROJECT_UUID;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env.PROJECT_UUID) {
|
if (transcriptionApiKey) {
|
||||||
headers["project-uuid"] = process.env.PROJECT_UUID;
|
headers.Authorization = `Bearer ${transcriptionApiKey}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const response = await fetch(transcriptionUrl, {
|
const response = await fetch(transcriptionUrl, {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user