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

TTS #27

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

TTS #27

wants to merge 24 commits into from

Conversation

Abhrant
Copy link
Contributor

@Abhrant Abhrant commented Oct 28, 2024

This PR adds a TTS engine for e2e voice assistant on Pi.

TTS engine functions in the following way :

  1. A separate thread having the tts process is called before the LLM :
  tts_processing_thread = threading.Thread(
                target=create_tts_wav,
                args=(stop_event, tts_processing_queue)
            )
  tts_processing_thread.start()
  1. A queue of word outputs form the LLM is maintained and once a delimiter ['.', '!', '?' , ":" , ";"] is reached, queue is emptied and the sentence is sent to the STT engine.

  2. STT used : https://github.com/rhasspy/piper

@Abhrant Abhrant added the enhancement New feature or request label Oct 28, 2024
@Abhrant Abhrant requested a review from Arnav0400 October 28, 2024 10:39
@Abhrant Abhrant self-assigned this Oct 28, 2024
Copy link
Contributor

@Arnav0400 Arnav0400 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we clean up the code (print statements, formatting, etc) and also have e2e benchmarks for this? Additionally can we also modify the config file to have audio out as a flag which triggers piper if set to true.


LOGGER = None
DEFAULT_CONFIG = "recipe/default.yaml"
DEFAULT_CONFIG = "/home/piuser/voice/nyuntam/examples/experimentals/voice_engine/recipe/rpi5.yaml"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have a relative path?

def create_tts_wav(
stop_event: threading.Event,
tts_processing_queue: queue.Queue,
output_dir: str = "/home/piuser/voice/core/test-output"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets have a relative path as default

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

Successfully merging this pull request may close these issues.

3 participants