mirror of
https://github.com/MarkParker5/STARK.git
synced 2025-02-17 11:55:35 +02:00
remove config dependency [no ci]
This commit is contained in:
parent
9789b799f7
commit
0009c26744
@ -2,7 +2,6 @@ import os
|
||||
from google.cloud import texttospeech
|
||||
import sounddevice
|
||||
import soundfile
|
||||
import config
|
||||
from .protocols import SpeechSynthesizer, SpeechSynthesizerResult
|
||||
|
||||
class Speech(SpeechSynthesizerResult):
|
||||
@ -24,12 +23,12 @@ class Speech(SpeechSynthesizerResult):
|
||||
|
||||
class GCloudSpeechSynthesizer(SpeechSynthesizer):
|
||||
|
||||
def __init__(self, name = config.voice_name, language_code = config.language_code):
|
||||
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = config.goole_tts_json_key
|
||||
def __init__(self, voice_name: str, language_code: str, json_key_path: str):
|
||||
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = json_key_path
|
||||
self._client = texttospeech.TextToSpeechClient()
|
||||
self._audio_config = texttospeech.AudioConfig(audio_encoding = texttospeech.AudioEncoding.LINEAR16)
|
||||
self._language_code= language_code
|
||||
self._name = name
|
||||
self._name = voice_name
|
||||
self._voice = texttospeech.VoiceSelectionParams(
|
||||
language_code = self._language_code,
|
||||
name = self._name,
|
||||
|
@ -2,7 +2,6 @@ import os
|
||||
import numpy
|
||||
import torch
|
||||
import sounddevice
|
||||
import config
|
||||
from .protocols import SpeechSynthesizer, SpeechSynthesizerResult
|
||||
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import pytest
|
||||
import config
|
||||
|
||||
|
||||
def test_basic_search(commands_context_flow_filled):
|
||||
|
Loading…
x
Reference in New Issue
Block a user