saysynth.cli.commands.note
Synthesize an individual note.
1""" 2Synthesize an individual note. 3""" 4import click 5from midi_utils import note_to_midi 6 7from saysynth.cli.options import (adsr_opts, duration_opts, log_configurations, 8 output_file_opt, phoneme_opts, say_opts, 9 segment_opts, start_opts, text_opt, 10 velocity_opts, volume_level_per_segment_opt) 11from saysynth.core import Note, controller 12 13 14def run(**kwargs): 15 note = Note(**kwargs) 16 note.cli(**kwargs) 17 18 19@click.command() 20@click.argument("root", type=note_to_midi, default="A2") 21@text_opt 22@start_opts 23@duration_opts 24@phoneme_opts 25@velocity_opts 26@volume_level_per_segment_opt 27@adsr_opts 28@segment_opts 29@output_file_opt 30@say_opts 31def cli(**kwargs): 32 """ 33 Generate an individual note. 34 """ 35 if kwargs["yaml"]: 36 return log_configurations("note", **kwargs) 37 kwargs = controller.handle_cli_options("note", **kwargs) 38 return run(**kwargs)
def
run(**kwargs):
cli = <Command cli>
Generate an individual note.