Remove unused HF repo arguments and reset audio output data in TTS server script
This commit is contained in:
parent
df36dfd918
commit
849302fb3f
|
|
@ -24,7 +24,6 @@ import websockets
|
||||||
SAMPLE_RATE = 24000
|
SAMPLE_RATE = 24000
|
||||||
|
|
||||||
TTS_TEXT = "Hello, this is a test of the moshi text to speech system, this should result in some nicely sounding generated voice."
|
TTS_TEXT = "Hello, this is a test of the moshi text to speech system, this should result in some nicely sounding generated voice."
|
||||||
DEFAULT_DSM_TTS_REPO = "kyutai/tts-1.6b-en_fr"
|
|
||||||
DEFAULT_DSM_TTS_VOICE_REPO = "kyutai/tts-voices"
|
DEFAULT_DSM_TTS_VOICE_REPO = "kyutai/tts-voices"
|
||||||
AUTH_TOKEN = "public_token"
|
AUTH_TOKEN = "public_token"
|
||||||
|
|
||||||
|
|
@ -64,6 +63,7 @@ async def output_audio(out: str, output_queue: asyncio.Queue[np.ndarray | None])
|
||||||
outdata[:, 0] = pcm_data
|
outdata[:, 0] = pcm_data
|
||||||
else:
|
else:
|
||||||
should_exit = True
|
should_exit = True
|
||||||
|
outdata[:] = 0
|
||||||
except asyncio.QueueEmpty:
|
except asyncio.QueueEmpty:
|
||||||
outdata[:] = 0
|
outdata[:] = 0
|
||||||
|
|
||||||
|
|
@ -95,17 +95,6 @@ async def websocket_client():
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"out", type=str, help="Output file to generate, use - for playing the audio"
|
"out", type=str, help="Output file to generate, use - for playing the audio"
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
|
||||||
"--hf-repo",
|
|
||||||
type=str,
|
|
||||||
default=DEFAULT_DSM_TTS_REPO,
|
|
||||||
help="HF repo in which to look for the pretrained models.",
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
|
||||||
"--voice-repo",
|
|
||||||
default=DEFAULT_DSM_TTS_VOICE_REPO,
|
|
||||||
help="HF repo in which to look for pre-computed voice embeddings.",
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--voice",
|
"--voice",
|
||||||
default="expresso/ex03-ex01_happy_001_channel1_334s.wav",
|
default="expresso/ex03-ex01_happy_001_channel1_334s.wav",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user