I use mac m2 pro, the generation of the speech is way to slow, help me get it more…
- User
I use mac m2 pro, the generation of the speech is way to slow, help me get it more faster : import outetts
Initialize the interface
model_config = outetts.GGUFModelConfig_v1( model_path="/Users/davidperso/projects/repository_folder/arxflix/local_models/OuteTTS 0.2 500M GGUF.gguf", language="en", # Supported languages in v0.2: en, zh, ja, ko n_gpu_layers=0, )
interface = outetts.InterfaceGGUF(model_version="0.2", cfg=model_config)
Print available default speakers
interface.print_default_speakers()
Load a default speaker
speaker = interface.load_default_speaker(name="male_1")
Generate speech
output = interface.generate( text="Hey Arxflix viewers! Today, we're exploring a groundbreaking paper on Visual Autoregressive Modeling, or VAR, which is changing the game in image generation. This approach reimagines how autoregressive models handle images, leading to significant improvements.", temperature=0.1, repetition_penalty=1.1, max_length=4096,
code# Optional: Use a speaker profile for consistent voice characteristics # Without a speaker profile, the model will generate a voice with random characteristics speaker=speaker,)
Save the generated speech to a file
output.save("output.wav")
Optional: Play the generated audio
output.play()
Assistant
Based on the repository context, I can help you optimize the speech generation speed on your M2 Mac. The main improvement would be to utilize GPU acceleration through the
n_gpu_layersparameter in your GGUF configuration.Here's the optimized version of your code:
python
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.