cloudlanguagetools 11.6.0__tar.gz → 11.6.1__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/PKG-INFO +1 -1
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/alibaba.py +12 -3
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/forvo.py +1 -1
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools.egg-info/PKG-INFO +1 -1
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/setup.py +1 -1
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/tests/test_audio.py +2 -2
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/LICENSE +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/README.rst +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/__init__.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/amazon.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/argostranslate.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/audio_processing.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/azure.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/cereproc.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/chatapi.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/constants.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/deepl.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/dictionarylookup.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/easypronunciation.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/elevenlabs.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/encryption.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/epitran.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/errors.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/fptai.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/google.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/keys.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/languages.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/libretranslate.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/mandarincantonese.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/naver.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/openai.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/options.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/pythainlp.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/service.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/servicemanager.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/spacy.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/test_services.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/tokenization.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/translationlanguage.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/transliterationlanguage.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/ttsvoice.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/vocalware.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/voicen.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/watson.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/wenlin.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools.egg-info/SOURCES.txt +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools.egg-info/dependency_links.txt +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools.egg-info/requires.txt +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools.egg-info/top_level.txt +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/setup.cfg +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/tests/test_breakdown.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/tests/test_chatapi.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/tests/test_dictionary_lookup.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/tests/test_llm.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/tests/test_mock_services.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/tests/test_servicemanager.py +0 -0
- {cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/tests/test_translation.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: cloudlanguagetools
|
3
|
-
Version: 11.6.
|
3
|
+
Version: 11.6.1
|
4
4
|
Summary: Interface with various cloud APIs for language processing such as translation, text to speech
|
5
5
|
Home-page: https://github.com/Language-Tools/cloud-language-tools-core
|
6
6
|
Author: Luc
|
@@ -8,6 +8,7 @@ import hmac
|
|
8
8
|
import base64
|
9
9
|
import logging
|
10
10
|
import tempfile
|
11
|
+
import pprint
|
11
12
|
from typing import List
|
12
13
|
|
13
14
|
import cloudlanguagetools.service
|
@@ -121,16 +122,24 @@ class AlibabaService(cloudlanguagetools.service.Service):
|
|
121
122
|
|
122
123
|
if response.status_code != 200:
|
123
124
|
data = response.json()
|
124
|
-
error_message =
|
125
|
-
logger.
|
125
|
+
error_message = f'could not retrieve audio using Alibaba: {response.content}'
|
126
|
+
logger.error(error_message)
|
126
127
|
raise cloudlanguagetools.errors.RequestError(text, voice, error_message)
|
127
128
|
|
128
129
|
if response.headers['Content-Type'] != 'audio/mpeg':
|
129
|
-
logger.
|
130
|
+
logger.error(f'Unexpected response type. Response as text: {response.text}')
|
130
131
|
raise cloudlanguagetools.errors.RequestError(
|
131
132
|
text, voice,
|
132
133
|
f'Got bad content type in response: {response.headers["Content-Type"]}'
|
133
134
|
)
|
135
|
+
|
136
|
+
# check the content length
|
137
|
+
if len(response.content) == 0:
|
138
|
+
# empty sound response
|
139
|
+
error_message = f'empty sound response. headers: {pprint.pformat(response.headers)}'
|
140
|
+
logger.error(error_message)
|
141
|
+
raise cloudlanguagetools.errors.RequestError(text, voice, f'empty sound result')
|
142
|
+
|
134
143
|
|
135
144
|
# Create a temporary file and write the audio content to it
|
136
145
|
output_temp_file = tempfile.NamedTemporaryFile(prefix=f'cloudlanguage_tools_{self.__class__.__name__}_audio', suffix='.mp3')
|
@@ -60,7 +60,7 @@ class ForvoService(cloudlanguagetools.service.Service):
|
|
60
60
|
|
61
61
|
# on 2024/07, forvo started throwing some errors with SSL verification, suspect an incorrect
|
62
62
|
# setup on their side but they are taking too long to fix it.
|
63
|
-
self.verify_ssl =
|
63
|
+
self.verify_ssl = True
|
64
64
|
|
65
65
|
def configure(self, config):
|
66
66
|
self.key = config['key']
|
{cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools.egg-info/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: cloudlanguagetools
|
3
|
-
Version: 11.6.
|
3
|
+
Version: 11.6.1
|
4
4
|
Summary: Interface with various cloud APIs for language processing such as translation, text to speech
|
5
5
|
Home-page: https://github.com/Language-Tools/cloud-language-tools-core
|
6
6
|
Author: Luc
|
@@ -6,7 +6,7 @@ from setuptools.command.install import install
|
|
6
6
|
# twine upload dist/*
|
7
7
|
|
8
8
|
setup(name='cloudlanguagetools',
|
9
|
-
version='11.6.
|
9
|
+
version='11.6.1',
|
10
10
|
description='Interface with various cloud APIs for language processing such as translation, text to speech',
|
11
11
|
long_description=open('README.rst', encoding='utf-8').read(),
|
12
12
|
url='https://github.com/Language-Tools/cloud-language-tools-core',
|
@@ -213,7 +213,7 @@ class TestAudio(unittest.TestCase):
|
|
213
213
|
|
214
214
|
xiaochen = [x for x in mandarin_azure_voices if 'Xiaochen' in x.name]
|
215
215
|
logger.debug(f'xiaochen voices: {pprint.pformat(xiaochen)}')
|
216
|
-
self.
|
216
|
+
self.assertIn(len(xiaochen), [3, 4], str(xiaochen)) # there is a regular and a multilingual
|
217
217
|
# and also a DragonHD, and DragonHD V1
|
218
218
|
|
219
219
|
xiaochen_single_language = [x for x in xiaochen if len(x.audio_languages) == 1][0]
|
@@ -292,7 +292,7 @@ class TestAudio(unittest.TestCase):
|
|
292
292
|
mandarin_azure_voices = [x for x in azure_voices if AudioLanguage.zh_CN in x.audio_languages]
|
293
293
|
|
294
294
|
xiaochen = [x for x in mandarin_azure_voices if 'Xiaochen' in x.name]
|
295
|
-
self.
|
295
|
+
self.assertIn(len(xiaochen), [3, 4]) # there is a regular and a multilingual, and dragonhd,
|
296
296
|
# and dragonhd latest
|
297
297
|
|
298
298
|
xiaochen_single_language = [x for x in xiaochen if len(x.audio_languages) == 1][0]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/argostranslate.py
RENAMED
File without changes
|
{cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/audio_processing.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/dictionarylookup.py
RENAMED
File without changes
|
{cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/easypronunciation.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/libretranslate.py
RENAMED
File without changes
|
{cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/mandarincantonese.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/servicemanager.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools/translationlanguage.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools.egg-info/requires.txt
RENAMED
File without changes
|
{cloudlanguagetools-11.6.0 → cloudlanguagetools-11.6.1}/cloudlanguagetools.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|