generated from mozilla-ai/Blueprint-template
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Multilingual support #72
Open
Kostis-S-Z
wants to merge
24
commits into
mozilla-ai:main
Choose a base branch
from
Kostis-S-Z:multilingual-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
286a93c
[WIP] Add bark and parler multi support
Kostis-S-Z 14b69bf
Add config files for other models to easily test across models
Kostis-S-Z 20ab8e9
Use model loading wrapper function for download_models.py
Kostis-S-Z ee38e10
Make sure transformers>4.31.0 (required for bark model)
Kostis-S-Z 890c684
Add parler dependency
Kostis-S-Z 8cc7b0d
Use TTSModelWrapper for demo code
Kostis-S-Z dcbb254
Use TTSModelWrapper for cli
Kostis-S-Z b0d40bc
Add outetts_language attribute
Kostis-S-Z 5e47b1e
Add TTSModelWrapper
Kostis-S-Z 945c44f
Update text_to_speech.py
Kostis-S-Z 4565fb8
Pass model-specific variables as **kwargs
Kostis-S-Z 01d0e7a
Rename TTSModelWrapper to TTSInterface
Kostis-S-Z 5af3e72
Update language argument to kwargs
Kostis-S-Z e3a3f17
Remove parler from dependencies
Kostis-S-Z a918574
Merge branch 'mozilla-ai:main' into multilingual-support
Kostis-S-Z fb814fa
Separate inference from TTSModel
Kostis-S-Z 672c0e0
Make sure config model is properly registered
Kostis-S-Z 28b02b8
Decouple loading & inference of TTS model
Kostis-S-Z b489e0d
Decouple loading & inference of TTS model
Kostis-S-Z dc89668
Enable user to exit podcast generation gracefully
Kostis-S-Z 0d143eb
Add Q2 Oute version to TTS_LOADERS
Kostis-S-Z e9ca498
Add comment for support in TTS_INFERENCE
Kostis-S-Z 47112a0
Update test_model_loaders.py
Kostis-S-Z ec0fe5a
Update test_text_to_speech.py
Kostis-S-Z File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
input_file: "example_data/a.md" | ||
output_folder: "example_data/bark/" | ||
text_to_text_model: "allenai/OLMoE-1B-7B-0924-Instruct-GGUF/olmoe-1b-7b-0924-instruct-q8_0.gguf" | ||
text_to_speech_model: "suno/bark" | ||
text_to_text_prompt: | | ||
You are a podcast scriptwriter generating engaging and natural-sounding conversations in JSON format. | ||
The script features the following speakers: | ||
{SPEAKERS} | ||
Instructions: | ||
- Write dynamic, easy-to-follow dialogue. | ||
- Include natural interruptions and interjections. | ||
- Avoid repetitive phrasing between speakers. | ||
- Format output as a JSON conversation. | ||
Example: | ||
{ | ||
"Speaker 1": "Welcome to our podcast! Today, we're exploring...", | ||
"Speaker 2": "Hi! I'm excited to hear about this. Can you explain...", | ||
"Speaker 1": "Sure! Imagine it like this...", | ||
"Speaker 2": "Oh, that's cool! But how does..." | ||
} | ||
speakers: | ||
- id: 1 | ||
name: Laura | ||
description: The main host. She explains topics clearly using anecdotes and analogies, teaching in an engaging and captivating way. | ||
voice_profile: "v2/en_speaker_0" | ||
|
||
- id: 2 | ||
name: Daniel | ||
description: The co-host. He keeps the conversation on track, asks curious follow-up questions, and reacts with excitement or confusion, often using interjections like hmm or umm. | ||
voice_profile: "v2/en_speaker_1" | ||
outetts_language: "en" # Supported languages in version 0.2-500M: en, zh, ja, ko. | ||
Kostis-S-Z marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
input_file: "example_data/a.md" | ||
output_folder: "example_data/parler/" | ||
text_to_text_model: "allenai/OLMoE-1B-7B-0924-Instruct-GGUF/olmoe-1b-7b-0924-instruct-q8_0.gguf" | ||
text_to_speech_model: "parler-tts/parler-tts-mini-v1.1" | ||
text_to_text_prompt: | | ||
You are a podcast scriptwriter generating engaging and natural-sounding conversations in JSON format. | ||
The script features the following speakers: | ||
{SPEAKERS} | ||
Instructions: | ||
- Write dynamic, easy-to-follow dialogue. | ||
- Include natural interruptions and interjections. | ||
- Avoid repetitive phrasing between speakers. | ||
- Format output as a JSON conversation. | ||
Example: | ||
{ | ||
"Speaker 1": "Welcome to our podcast! Today, we're exploring...", | ||
"Speaker 2": "Hi! I'm excited to hear about this. Can you explain...", | ||
"Speaker 1": "Sure! Imagine it like this...", | ||
"Speaker 2": "Oh, that's cool! But how does..." | ||
} | ||
speakers: | ||
- id: 1 | ||
name: Laura | ||
description: The main host. She explains topics clearly using anecdotes and analogies, teaching in an engaging and captivating way. | ||
voice_profile: Laura's voice is calm and slow in delivery, with no background noise. | ||
|
||
- id: 2 | ||
name: Daniel | ||
description: The co-host. He keeps the conversation on track, asks curious follow-up questions, and reacts with excitement or confusion, often using interjections like hmm or umm. | ||
voice_profile: Daniel's voice is monotone yet slightly fast in delivery, with a very close recording that almost has no background noise. | ||
outetts_language: "en" # Supported languages in version 0.2-500M: en, zh, ja, ko. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
input_file: "example_data/a.md" | ||
output_folder: "example_data/parler_multi/" | ||
text_to_text_model: "allenai/OLMoE-1B-7B-0924-Instruct-GGUF/olmoe-1b-7b-0924-instruct-q8_0.gguf" | ||
text_to_speech_model: "parler-tts/parler-tts-mini-multilingual-v1.1" | ||
text_to_text_prompt: | | ||
You are a podcast scriptwriter generating engaging and natural-sounding conversations in JSON format. | ||
The script features the following speakers: | ||
{SPEAKERS} | ||
Instructions: | ||
- Write dynamic, easy-to-follow dialogue. | ||
- Include natural interruptions and interjections. | ||
- Avoid repetitive phrasing between speakers. | ||
- Format output as a JSON conversation. | ||
Example: | ||
{ | ||
"Speaker 1": "Welcome to our podcast! Today, we're exploring...", | ||
"Speaker 2": "Hi! I'm excited to hear about this. Can you explain...", | ||
"Speaker 1": "Sure! Imagine it like this...", | ||
"Speaker 2": "Oh, that's cool! But how does..." | ||
} | ||
speakers: | ||
- id: 1 | ||
name: Laura | ||
description: The main host. She explains topics clearly using anecdotes and analogies, teaching in an engaging and captivating way. | ||
voice_profile: Laura's voice is calm and slow in delivery, with no background noise. | ||
|
||
- id: 2 | ||
name: Daniel | ||
description: The co-host. He keeps the conversation on track, asks curious follow-up questions, and reacts with excitement or confusion, often using interjections like hmm or umm. | ||
voice_profile: Daniel's voice is monotone yet slightly fast in delivery, with a very close recording that almost has no background noise. | ||
outetts_language: "en" # Supported languages in version 0.2-500M: en, zh, ja, ko. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,7 @@ dependencies = [ | |
"pydantic", | ||
"PyPDF2[crypto]", | ||
"python-docx", | ||
"transformers>4.31.0", | ||
"streamlit", | ||
] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we want to add multiple configs here, I guess is a discussion to have with the developer hub. All these seem like potential "Use Case" / "Customization" examples