Class: Informers::TextToAudioPipeline
- Defined in:
- lib/informers/pipelines.rb
Constant Summary collapse
- DEFAULT_VOCODER_ID =
"Xenova/speecht5_hifigan"
Instance Method Summary collapse
- #call(text_inputs, speaker_embeddings: nil) ⇒ Object
-
#initialize(**options) ⇒ TextToAudioPipeline
constructor
A new instance of TextToAudioPipeline.
Constructor Details
#initialize(**options) ⇒ TextToAudioPipeline
Returns a new instance of TextToAudioPipeline.
804 805 806 807 808 809 |
# File 'lib/informers/pipelines.rb', line 804 def initialize(**) super(**) # TODO: Find a better way for `pipeline` to set the default vocoder @vocoder = [:vocoder] end |
Instance Method Details
#call(text_inputs, speaker_embeddings: nil) ⇒ Object
811 812 813 814 815 816 817 818 |
# File 'lib/informers/pipelines.rb', line 811 def call(text_inputs, speaker_embeddings: nil) # If this.processor is not set, we are using a `AutoModelForTextToWaveform` model if @processor call_text_to_spectrogram(text_inputs, speaker_embeddings:) else call_text_to_waveform(text_inputs) end end |