HerzaJ commited on
Commit
20ce9ba
·
verified ·
1 Parent(s): 8b370ad

Update plugins/transcript.js

Browse files
Files changed (1) hide show
  1. plugins/transcript.js +3 -6
plugins/transcript.js CHANGED
@@ -3,7 +3,7 @@ const FormData = require('form-data');
3
 
4
  const handler = async (req, res) => {
5
  try {
6
- const { audio_url, language = 'auto' } = req.query;
7
 
8
  if (!audio_url) {
9
  return res.status(400).json({
@@ -33,10 +33,6 @@ const handler = async (req, res) => {
33
  form.append('model', 'whisper-large-v3-turbo');
34
  form.append('temperature', '0');
35
  form.append('response_format', 'verbose_json');
36
-
37
- if (language !== 'auto') {
38
- form.append('language', language);
39
- }
40
 
41
  const transcriptionResponse = await axios.post(
42
  'https://api.groq.com/openai/v1/audio/transcriptions',
@@ -76,7 +72,8 @@ module.exports = {
76
  routes: ['api/AI/transcribe'],
77
  tags: ['ai', 'audio', 'transcription', 'whisper'],
78
  main: ['AI'],
79
- parameters: ['audio_url', 'language'],
80
  enabled: true,
 
81
  handler
82
  };
 
3
 
4
  const handler = async (req, res) => {
5
  try {
6
+ const { audio_url } = req.query;
7
 
8
  if (!audio_url) {
9
  return res.status(400).json({
 
33
  form.append('model', 'whisper-large-v3-turbo');
34
  form.append('temperature', '0');
35
  form.append('response_format', 'verbose_json');
 
 
 
 
36
 
37
  const transcriptionResponse = await axios.post(
38
  'https://api.groq.com/openai/v1/audio/transcriptions',
 
72
  routes: ['api/AI/transcribe'],
73
  tags: ['ai', 'audio', 'transcription', 'whisper'],
74
  main: ['AI'],
75
+ parameters: ['audio_url', 'key'],
76
  enabled: true,
77
+ limit: 8,
78
  handler
79
  };