Ë
    œ…jT  ã                  ó�   — d dl mZ d dlmZmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ ed   Z G d„ d	ed
¬«      Zddœ	 	 	 	 	 	 	 dd„Zy)é    )Úannotations)ÚLiteralÚ	TypedDict)ÚUnpack)Ú	AudioData)Ú
SetupError)ÚOpenAICompatibleRecognizer)úwhisper-large-v3-turbozwhisper-large-v3c                  ó:   — e Zd ZU dZded<   ded<   ded<   ded<   y)	ÚGroqOptionalParameterszzGroq speech transcription's optional parameters.

    https://console.groq.com/docs/api-reference#audio-transcription
    ÚstrÚpromptÚresponse_formatÚfloatÚtemperatureÚlanguageN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__© ó    úp/root/aria/tools/markitdown-venv/lib/python3.12/site-packages/speech_recognition/recognizers/whisper_api/groq.pyr   r      s   … ñð
 ƒKØÓØÓØ„Mr   r   F)Útotalr
   )Úmodelc               ó–   — 	 ddl }t        |j	                  «       «      } |j
                  ||fi |¤ŽS # t        $ r t        d«      ‚w xY w)aª  Performs speech recognition on ``audio_data`` (an ``AudioData`` instance), using the Groq Whisper API.

    This function requires login to Groq; visit https://console.groq.com/login, then generate API Key in `API Keys <https://console.groq.com/keys>`__ menu.

    Detail: https://console.groq.com/docs/speech-to-text

    Set environment variable ``GROQ_API_KEY``; otherwise groq library will raise a ``groq.GroqError``.
    r   Nz:missing groq module: ensure that groq is set up correctly.)ÚgroqÚImportErrorr   r	   ÚGroqÚ	recognize)Ú
recognizerÚ
audio_datar   Úkwargsr   Úgroq_recognizers         r   r!   r!      sW   € ð
Ûô 1°·±³Ó=€OØ$ˆ?×$Ñ$ Z°ÑA¸&ÑAÐAøô ò 
ÜØHó
ð 	
ð
ús	   ‚3 ³AN)r#   z'AudioData'r   Ú	GroqModelr$   zUnpack[GroqOptionalParameters]Úreturnr   )Ú
__future__r   Útypingr   r   Útyping_extensionsr   Úspeech_recognition.audior   Úspeech_recognition.exceptionsr   Ú/speech_recognition.recognizers.whisper_api.baser	   r&   r   r!   r   r   r   ú<module>r.      sk   ðÝ "ç %å $å .Ý 4õð
 Ø0ñ€	ô
	˜Y¨eõ 	ð  0ñ	BàðBð ð	Bð
 -ðBð 	ôBr   