In handling audio transcriptions, users can often benefit from receiving multiple alternatives to ensure accuracy and select the most appropriate transcription based on context. While utilizing Deepgram's API, a feature referred to as "alternatives" allows this functionality.
Deepgram's API offers a method to receive multiple transcription alternatives, though its availability and usage depend on the models used.
The "alternatives" feature can be requested by appending the alternatives
parameter in the API call, specifying the number of alternatives desired. For example:
curl --location 'https://api.deepgram.com/v1/listen?alternatives=2&model=nova' \
--header 'Content-Type: audio/wave' \
--header 'Authorization: Your API KEY' \
--data-binary '@/YOUR FILE'
Note:
nova
, base
, and enhanced
. However, it's not supported in nova-2
models.Be advised, though useful, the alternatives feature is deprecated for some newer models, specifically nova-2
. Keep an eye on updates and documentation from Deepgram for alternatives or new approaches to achieving similar functionality.
alternatives
on unsupported models like nova-2
results in a "Bad Request" error. Ensure your request aligns with models that support the alternatives feature.The alternatives feature is an invaluable tool within Deepgram's older models. Users should adjust their model and parameter usage according to the deprecations. For ongoing needs with multiple transcription options, Deepgram's community is also available for assistance and potential workarounds.
If issues persist or the system behavior seems inconsistent, reach out to your Deepgram support representative (if you have one) or visit our community for assistance: https://discord.gg/deepgram
Deepgram Discord Community: https://discord.gg/deepgram
By integrating these practices, users can optimize their use of Deepgram API alternatives feature effectively.