Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio Ouput Plugin Question #52

Open
khalton55 opened this issue Nov 1, 2024 · 0 comments
Open

Audio Ouput Plugin Question #52

khalton55 opened this issue Nov 1, 2024 · 0 comments

Comments

@khalton55
Copy link

Hi,

I am trying to use Piper TTS and Audio Recorder to generate a wav file based on text input. I set up the args to open './response.wav' as the audio output file. Currently, when I process one string it generates the speech however, on subsequent strings it appends to the file. Ex: string1 = response1, string2 = response1 + response2. Is there an argument or way to overwrite the response.wav instead of appending to it? Let me know if there are any more questions - I tried digging through the code but got lost :)

Code Snippets:
args = ArgParser(extras=['tts', 'audio_output', 'prompt', 'log', 'voice', 'voice-speaker']).parse_args()
args.tts = 'piper'
args.audio_output_file = './response.wav'
args.verbose = True
args.voice= 'en_US-hfc_male-medium'


tts = AutoTTS.from_pretrained(**vars(args))

    if args.audio_output_file is not None:
        tts.add(AudioRecorder(**vars(args)))

    #Starts TTS service
    tts.start()

tts.process(reply)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant