Update page.tsx
This commit is contained in:
@@ -36,13 +36,15 @@ const AudioTranscriber: React.FC = () => {
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
setError(null); // Clear previous errors
|
setError(null); // Clear previous errors
|
||||||
try {
|
try {
|
||||||
const response = await fetch("/api/transcribe", {
|
let response = await fetch("/api/transcribe", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: formData,
|
body: formData,
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "multipart/form-data",
|
"Content-Type": "multipart/form-data",
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
response = await response.json();
|
||||||
console.log("Transcription response:", response);
|
console.log("Transcription response:", response);
|
||||||
|
|
||||||
// if (response.data && response.data.transcription) {
|
// if (response.data && response.data.transcription) {
|
||||||
|
|||||||
Reference in New Issue
Block a user