1
0
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:
Mark Parker 2023-09-15 15:32:31 +02:00
parent 9789b799f7
commit 0009c26744
No known key found for this signature in database
GPG Key ID: C10A60786A07A300
3 changed files with 3 additions and 6 deletions

View File

@ -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,

View File

@ -2,7 +2,6 @@ import os
import numpy
import torch
import sounddevice
import config
from .protocols import SpeechSynthesizer, SpeechSynthesizerResult

View File

@ -1,5 +1,4 @@
import pytest
import config
def test_basic_search(commands_context_flow_filled):