HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/buyercall/buyercall/lib/__pycache__/util_boto3_polly.cpython-310.pyc
o

we��@sddlZGdd�d�ZdS)�Nc@s:eZdZdZdd�Z				ddd	�Zd
d�Zdd
�ZdS)�AwsPollyNcCs(tj|d|d|dd��d�|_dS)N�
access_key�
secret_key�region)�aws_access_key_id�aws_secret_access_key�region_name�polly)�boto3�Session�client�polly_client)�self�config�r�@/home/arjun/projects/buyercall/buyercall/lib/util_boto3_polly.py�__init__s��zAwsPolly.__init__�Joanna�mp3��standardcCs|jj||||d�}|S)N)�VoiceId�OutputFormat�Text�Engine)r
�synthesize_speech)r�voice_id�
output_format�text�engine�responserrrr
s�zAwsPolly.synthesize_speechcCs(|jjddddddd�}|dd	}|S)
Nrzsynth-books-buckets�keyrz(This is a sample text to be synthesized.�neural)r�OutputS3BucketName�OutputS3KeyPrefixrrr�
SynthesisTask�TaskId)r
�start_speech_synthesis_task)rr �taskIdrrrr's�z$AwsPolly.start_speech_synthesis_taskcCs|jj|d�}|S)N)r&)r
�get_speech_synthesis_task)r�task_id�task_statusrrrr) sz"AwsPolly.get_speech_synthesis_task)rrrr)�__name__�
__module__�__qualname__r
rrr'r)rrrrrs
�	
r)r
rrrrr�<module>s