mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 03:04:13 +00:00
Litellm dev 12 28 2024 p3 (#7464)
* feat(deepgram/): initial e2e support for deepgram stt Uses deepgram's `/listen` endpoint to transcribe speech to text Closes https://github.com/BerriAI/litellm/issues/4875 * fix: fix linting errors * test: fix test
This commit is contained in:
parent
480d838790
commit
ebc28b1921
10 changed files with 303 additions and 5 deletions
|
@ -4867,7 +4867,30 @@ def transcription(
|
|||
api_base=api_base,
|
||||
api_key=api_key,
|
||||
)
|
||||
|
||||
elif custom_llm_provider == "deepgram":
|
||||
response = base_llm_http_handler.audio_transcriptions(
|
||||
model=model,
|
||||
audio_file=file,
|
||||
optional_params=optional_params,
|
||||
model_response=model_response,
|
||||
atranscription=atranscription,
|
||||
client=(
|
||||
client
|
||||
if client is not None
|
||||
and (
|
||||
isinstance(client, HTTPHandler)
|
||||
or isinstance(client, AsyncHTTPHandler)
|
||||
)
|
||||
else None
|
||||
),
|
||||
timeout=timeout,
|
||||
max_retries=max_retries,
|
||||
logging_obj=litellm_logging_obj,
|
||||
api_base=api_base,
|
||||
api_key=api_key,
|
||||
custom_llm_provider="deepgram",
|
||||
headers={},
|
||||
)
|
||||
if response is None:
|
||||
raise ValueError("Unmapped provider passed in. Unable to get the response.")
|
||||
return response
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue