Initial commit: Doctor-Patient clinical transcription and structured summary pipeline
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
const fs = require('fs');
|
||||
const dotenv = require('dotenv');
|
||||
|
||||
dotenv.config();
|
||||
|
||||
async function test() {
|
||||
const formData = new FormData();
|
||||
formData.append('model', 'saaras:v4');
|
||||
formData.append('with_diarization', 'true');
|
||||
|
||||
// Create a dummy text file to pass validation if needed
|
||||
formData.append('file', new Blob(['test'], { type: 'audio/wav' }), 'test.wav');
|
||||
|
||||
const res = await fetch('https://api.sarvam.ai/speech-to-text', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'api-subscription-key': process.env.SARVAM_API_KEY
|
||||
},
|
||||
body: formData
|
||||
});
|
||||
|
||||
console.log(res.status);
|
||||
console.log(await res.text());
|
||||
}
|
||||
test();
|
||||
Reference in New Issue
Block a user