Create transcription
استخدم CometAPI POST /v1/audio/transcriptions لتفريغ الصوت إلى نص باستخدام model تفريغ محدد وتنسيق response مختار.
أول request
أرسل ملفًا صوتيًا مدعومًا معmodel وfile. اجعل الملف الأول قصيرًا أثناء التحقق من معالجة الرفع، والمصادقة، وتحليل response.
قراءة response
يتضمن response الافتراضيtext الذي تم تفريغه. إذا طلبت تنسيق response آخر، فتأكد من أن العميل لديك يحلل ذلك التنسيق بدلًا من افتراض بنية JSON الافتراضية.
الخطوات التالية
- استخدم Create Speech عندما تحتاج إلى مخرجات تحويل النص إلى كلام.
- استخدم Create Translation عندما يجب أن تكون المخرجات المستهدفة باللغة الإنجليزية.
التفويضات
Bearer token authentication. Use your CometAPI key.
الجسم
The audio file to transcribe. Supported formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, webm.
The speech-to-text model to use. Choose a current speech model from the Models page.
The language of the input audio in ISO-639-1 format (e.g., en, zh, ja). Supplying the language improves accuracy and latency.
Optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.
The output format for the transcription.
json, text, srt, verbose_json, vtt Sampling temperature between 0 and 1. Higher values produce more random output; lower values are more focused. When set to 0, the model auto-adjusts temperature using log probability.
0 <= x <= 1الاستجابة
The transcription result.
The transcribed text.