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

No instructions on how to build and synthesize some text or files #1

Open
denizsincar29 opened this issue May 28, 2023 · 4 comments · May be fixed by #7
Open

No instructions on how to build and synthesize some text or files #1

denizsincar29 opened this issue May 28, 2023 · 4 comments · May be fixed by #7

Comments

@denizsincar29
Copy link

Hello. Can you provide info on how to build and synthesize some text in rust? I have no idea.

@mush42
Copy link
Owner

mush42 commented May 28, 2023

Hi @denizsincar29

I'm planning to add a binary crate to serve as a frontend to the crate as well as to showcase some of the capabilities of this synthesizer.

@avocadoboi
Copy link

Here's a simple example I made in my fork.

use std::{
    sync::Arc, 
    error::Error
};

use once_cell::sync::Lazy;

use piper::{
    synth::PiperSpeechSynthesizer,
    vits::VitsModel
};

static ENVIRONMENT: Lazy<Arc<ort::Environment>> = Lazy::new(|| Arc::new(ort::Environment::default()));

fn main() -> Result<(), Box<dyn Error>> {
    let synthesizer = PiperSpeechSynthesizer::new(Arc::new(VitsModel::new("en_GB-alba-medium.onnx.json".into(), "en_GB-alba-medium.onnx".into(), &ENVIRONMENT)?))?;
    synthesizer.synthesize_to_file("hello.wav", "Hello world".to_string())?;

    Ok(())
}

@mcmah309
Copy link

@mush42 Any update on when examples could be added and/or this package being published on crates.io ? Great work by the way!

@thewh1teagle thewh1teagle linked a pull request Aug 30, 2024 that will close this issue
@thewh1teagle
Copy link

thewh1teagle commented Aug 30, 2024

@mcmah309

I added pr with simple example

@mush42
Would you mind publish the crates to crates.io so we can use that example in other projects?
I can't publish another project that depends on unpunished crate.

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

Successfully merging a pull request may close this issue.

5 participants