@@ -25,7 +25,7 @@ def initialize(client, s3_client = S3Client.new)
2525 # Uploads an audio file to S3 and creates a translation job.
2626 # @return [Lara::Models::Audio]
2727 def upload ( file_path :, filename :, target :, source : nil , adapt_to : nil , glossaries : nil ,
28- no_trace : false , style : nil )
28+ no_trace : false , style : nil , voice_gender : nil )
2929 response_data = @client . get ( "/v2/audio/upload-url" , params : { filename : filename } )
3030 url = response_data [ "url" ]
3131 fields = response_data [ "fields" ]
@@ -38,7 +38,8 @@ def upload(file_path:, filename:, target:, source: nil, adapt_to: nil, glossarie
3838 source : source ,
3939 adapt_to : adapt_to ,
4040 glossaries : glossaries ,
41- style : style
41+ style : style ,
42+ voice_gender : voice_gender
4243 } . compact
4344
4445 headers = { }
@@ -67,9 +68,10 @@ def download(id)
6768 # Translates an audio file end-to-end
6869 # @return [String] translated audio bytes
6970 def translate ( file_path :, filename :, target :, source : nil , adapt_to : nil , glossaries : nil ,
70- no_trace : false , style : nil )
71+ no_trace : false , style : nil , voice_gender : nil )
7172 audio = upload ( file_path : file_path , filename : filename , target : target , source : source ,
72- adapt_to : adapt_to , glossaries : glossaries , no_trace : no_trace , style : style )
73+ adapt_to : adapt_to , glossaries : glossaries , no_trace : no_trace , style : style ,
74+ voice_gender : voice_gender )
7375
7476 max_wait_time = 60 * 15 # 15 minutes
7577 start = Time . now
0 commit comments