Updated the audiogen application to use the LiteRT API#199
Open
gmiodice wants to merge 4 commits into
Open
Conversation
Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
snnn
reviewed
Apr 29, 2026
snnn
reviewed
Apr 29, 2026
Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
terryheo
reviewed
May 8, 2026
| std::string autoencoder_encoder_tflite = models_base_path + "/autoencoder_encoder_model.tflite"; | ||
| std::string sentence_model_path = models_base_path + "/spiece.model"; | ||
|
|
||
| auto env = get_litert_value(litert::Environment::Create({})); |
There was a problem hiding this comment.
I don't think you need to create new Environment here.
encode_audio() gets env as parameter and you can keep using it.
| memcpy(dit_globalcond_in_data, t5_globalcond_out_data, get_num_elems(dit_globalcond_in_dims) * sizeof(float)); | ||
| // Copy T5 outputs to DiT inputs (constants for diffusion loop) | ||
| { | ||
| auto t5_cross_ptr = get_litert_value(t5_outputs[k_t5_crossattn_out_idx].Lock(litert::TensorBuffer::LockMode::kRead)); |
There was a problem hiding this comment.
you don't need to deep copy the content of TensorBuffer.
You can create virtual copy of the T5 outputs TensorBuffer using TensorBuffer::Duplicate().
And use it as inputs of Dit model. I've added an example here: google-ai-edge/LiteRT#7302
terryheo
reviewed
May 9, 2026
|
|
||
| - **input_audio_path (-i)**: Add input audio file for style transfer | ||
| - **sigma_max (-x)**: A hyper parameter to tweak noise level No newline at end of file | ||
| - **sigma_max (-x)**: A hyper parameter to tweak noise level |
There was a problem hiding this comment.
Could you add some e2e example how to use this tool?
Signed-off-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.