All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.nasdanika.html.model.components.TextToSpeech Maven / Gradle / Ivy

The newest version!
/**
 */
package org.nasdanika.html.model.components;

import org.nasdanika.html.model.bootstrap.Appearance;

import org.nasdanika.ncore.ModelElement;

/**
 * 
 * A representation of the model object 'Text To Speech'.
 * 
 *
 * 
 * Uses [Google Text-to-Speech](https://cloud.google.com/text-to-speech) to synthesize 
 * voice from text or [SSML](https://cloud.google.com/text-to-speech/docs/ssml). 
 * Voice is output to an mp3 file. File name is defined by the ``path`` attribute if it is not blank. 
 * In this case path is resolved relative to the containing action. 
 * If ``path`` attribute is blank then the file name is computed as a digest of the sound bytes.
 * 
 * Generates audio tag which plays the synthesized speech.
 * 
 * Use of text to speech requires ``GOOGLE_APPLICATION_CREDENTIALS`` environment variable to be set to the location of the private key JSON file.
 * See https://developers.google.com/accounts/docs/application-default-credentials for more information.
 *    
 * 
 *
 * 

* The following features are supported: *

*
    *
  • {@link org.nasdanika.html.model.components.TextToSpeech#getLanguage Language}
  • *
  • {@link org.nasdanika.html.model.components.TextToSpeech#getVoice Voice}
  • *
  • {@link org.nasdanika.html.model.components.TextToSpeech#getFormat Format}
  • *
  • {@link org.nasdanika.html.model.components.TextToSpeech#isInterpolate Interpolate}
  • *
  • {@link org.nasdanika.html.model.components.TextToSpeech#getAppearance Appearance}
  • *
  • {@link org.nasdanika.html.model.components.TextToSpeech#getPath Path}
  • *
  • {@link org.nasdanika.html.model.components.TextToSpeech#isEmbed Embed}
  • *
* * @see org.nasdanika.html.model.components.ComponentsPackage#getTextToSpeech() * @model abstract="true" * @generated */ public interface TextToSpeech extends ModelElement { /** * Returns the value of the 'Language' attribute. * * * * Language and locale code, e.g. ``en-US``. If blank, then the contextual language and locale are used - hardcoded in the UI and configurable in the CLI. * See [Supported voices and languages](https://cloud.google.com/text-to-speech/docs/voices) for a list of locales and voices. * * @return the value of the 'Language' attribute. * @see #setLanguage(String) * @see org.nasdanika.html.model.components.ComponentsPackage#getTextToSpeech_Language() * @model * @generated */ String getLanguage(); /** * Sets the value of the '{@link org.nasdanika.html.model.components.TextToSpeech#getLanguage Language}' attribute. * * * @param value the new value of the 'Language' attribute. * @see #getLanguage() * @generated */ void setLanguage(String value); /** * Returns the value of the 'Voice' attribute. * * * * Voice name, e.g. ``en-US-Wavenet-D``. If blank, then the contextual voice is used - hardcoded in the UI and configurable in the CLI. * See [Supported voices and languages](https://cloud.google.com/text-to-speech/docs/voices) for a list of locales and voices. * * @return the value of the 'Voice' attribute. * @see #setVoice(String) * @see org.nasdanika.html.model.components.ComponentsPackage#getTextToSpeech_Voice() * @model * @generated */ String getVoice(); /** * Sets the value of the '{@link org.nasdanika.html.model.components.TextToSpeech#getVoice Voice}' attribute. * * * @param value the new value of the 'Voice' attribute. * @see #getVoice() * @generated */ void setVoice(String value); /** * Returns the value of the 'Format' attribute. * The default value is "Text". * * * * Text format - ``Text`` or ``SSML``. * * @return the value of the 'Format' attribute. * @see #setFormat(String) * @see org.nasdanika.html.model.components.ComponentsPackage#getTextToSpeech_Format() * @model default="Text" * @generated */ String getFormat(); /** * Sets the value of the '{@link org.nasdanika.html.model.components.TextToSpeech#getFormat Format}' attribute. * * * @param value the new value of the 'Format' attribute. * @see #getFormat() * @generated */ void setFormat(String value); /** * Returns the value of the 'Interpolate' attribute. * * * * If true, text/ssml is interpolated before speech generation. * * @return the value of the 'Interpolate' attribute. * @see #setInterpolate(boolean) * @see org.nasdanika.html.model.components.ComponentsPackage#getTextToSpeech_Interpolate() * @model * @generated */ boolean isInterpolate(); /** * Sets the value of the '{@link org.nasdanika.html.model.components.TextToSpeech#isInterpolate Interpolate}' attribute. * * * @param value the new value of the 'Interpolate' attribute. * @see #isInterpolate() * @generated */ void setInterpolate(boolean value); /** * Returns the value of the 'Appearance' containment reference. * * * * Appearance to apply to the generated audio tag. * * @return the value of the 'Appearance' containment reference. * @see #setAppearance(Appearance) * @see org.nasdanika.html.model.components.ComponentsPackage#getTextToSpeech_Appearance() * @model containment="true" * @generated */ Appearance getAppearance(); /** * Sets the value of the '{@link org.nasdanika.html.model.components.TextToSpeech#getAppearance Appearance}' containment reference. * * * @param value the new value of the 'Appearance' containment reference. * @see #getAppearance() * @generated */ void setAppearance(Appearance value); /** * Returns the value of the 'Path' attribute. * * * * MP3 resource location (file name) relative to the containing action context URI. * If this attribute is blank then the file name is computed as a digest of the sound bytes. * * @return the value of the 'Path' attribute. * @see #setPath(String) * @see org.nasdanika.html.model.components.ComponentsPackage#getTextToSpeech_Path() * @model * @generated */ String getPath(); /** * Sets the value of the '{@link org.nasdanika.html.model.components.TextToSpeech#getPath Path}' attribute. * * * @param value the new value of the 'Path' attribute. * @see #getPath() * @generated */ void setPath(String value); /** * Returns the value of the 'Embed' attribute. * * * * If true, audio data is not stored to a file, but is embedded into the page using ``data:`` URI. * * @return the value of the 'Embed' attribute. * @see #setEmbed(boolean) * @see org.nasdanika.html.model.components.ComponentsPackage#getTextToSpeech_Embed() * @model * @generated */ boolean isEmbed(); /** * Sets the value of the '{@link org.nasdanika.html.model.components.TextToSpeech#isEmbed Embed}' attribute. * * * @param value the new value of the 'Embed' attribute. * @see #isEmbed() * @generated */ void setEmbed(boolean value); } // TextToSpeech




© 2015 - 2025 Weber Informatics LLC | Privacy Policy