@@ -132,6 +132,7 @@ async def test_clone_voice(client: Neuphonic, mocker: MockerFixture):
132132 voice_name = "TestVoice-SDK"
133133 voice_tags = ["tag1" , "tag2" ]
134134 voice_tags_adapted = "tag1, tag2"
135+ lang_code = "en"
135136
136137 # Mock the file content
137138 with tempfile .NamedTemporaryFile (suffix = ".wav" , delete = False ) as temp_file :
@@ -160,7 +161,9 @@ async def test_clone_voice(client: Neuphonic, mocker: MockerFixture):
160161 mock_post .return_value = mock_response
161162
162163 # Call the clone method
163- response = client .voices .clone (voice_name , voice_file_path , voice_tags )
164+ response = client .voices .clone (
165+ voice_name , voice_file_path , voice_tags , lang_code
166+ )
164167
165168 # Assertions
166169 assert isinstance (response , APIResponse )
@@ -171,7 +174,7 @@ async def test_clone_voice(client: Neuphonic, mocker: MockerFixture):
171174 mock_post .assert_called_once_with (
172175 f"https://{ base_url } /voices?voice_name={ voice_name } " ,
173176 json = None ,
174- params = {"voice_tags" : voice_tags_adapted },
177+ params = {"lang_code" : "en" , " voice_tags" : voice_tags_adapted },
175178 files = {"voice_file" : mocker .ANY }, # Matches the file object
176179 headers = {"x-api-key" : mocker .ANY }, # Ensure the API key is present
177180 timeout = 10 ,
0 commit comments