Spaces:
Sleeping
Sleeping
- __pycache__/tts_gen.cpython-312.pyc +0 -0
- app.py +3 -3
__pycache__/tts_gen.cpython-312.pyc
CHANGED
|
Binary files a/__pycache__/tts_gen.cpython-312.pyc and b/__pycache__/tts_gen.cpython-312.pyc differ
|
|
|
app.py
CHANGED
|
@@ -50,7 +50,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 50 |
from tts_gen import TTSGenerator, translit2rus
|
| 51 |
import random
|
| 52 |
|
| 53 |
-
sample_rate =
|
| 54 |
tts = TTSGenerator(sample_rate)
|
| 55 |
silero_voices = tts.get_all_voices()
|
| 56 |
import tempfile, os, uuid
|
|
@@ -60,7 +60,7 @@ def get_random_voice(voices):
|
|
| 60 |
|
| 61 |
def silero_voice_generator(sentence):
|
| 62 |
voice_id = get_random_voice(silero_voices)
|
| 63 |
-
return tts.generate_voice(text =
|
| 64 |
|
| 65 |
|
| 66 |
@tool
|
|
@@ -104,7 +104,7 @@ final_answer = FinalAnswerTool()
|
|
| 104 |
# custom_role_conversions=None,
|
| 105 |
#)
|
| 106 |
|
| 107 |
-
mistral_api_key = os.environ.get("MISTRAL_API_KEY") # Set your API key in the environment
|
| 108 |
model = OpenAIServerModel(model_id='mistral-small-latest', api_base='https://api.mistral.ai/v1', api_key=mistral_api_key)
|
| 109 |
|
| 110 |
|
|
|
|
| 50 |
from tts_gen import TTSGenerator, translit2rus
|
| 51 |
import random
|
| 52 |
|
| 53 |
+
sample_rate = 16000
|
| 54 |
tts = TTSGenerator(sample_rate)
|
| 55 |
silero_voices = tts.get_all_voices()
|
| 56 |
import tempfile, os, uuid
|
|
|
|
| 60 |
|
| 61 |
def silero_voice_generator(sentence):
|
| 62 |
voice_id = get_random_voice(silero_voices)
|
| 63 |
+
return tts.generate_voice(text = sentence, speaker = voice_id)
|
| 64 |
|
| 65 |
|
| 66 |
@tool
|
|
|
|
| 104 |
# custom_role_conversions=None,
|
| 105 |
#)
|
| 106 |
|
| 107 |
+
mistral_api_key = os.environ.get("MISTRAL_API_KEY", "NZmDhwQK9aiz8qj95ZHdWnKTEKd2vUk7") # Set your API key in the environment
|
| 108 |
model = OpenAIServerModel(model_id='mistral-small-latest', api_base='https://api.mistral.ai/v1', api_key=mistral_api_key)
|
| 109 |
|
| 110 |
|