[][src]Struct ttspico::Voice

pub struct Voice { /* fields omitted */ }

A Pico TTS voice.

Methods

impl Voice[src]

pub fn sys(&self) -> Rc<RefCell<System>>[src]

Returns a reference to the parent System that created this voice.

pub fn name(&self) -> Result<&str, Utf8Error>[src]

Returns the voice's name (if it can be converted to UTF-8).

pub fn add_resource(
    &mut self,
    resource: Rc<RefCell<Resource>>
) -> Result<(), PicoError>
[src]

Adds a loaded Resource to this voice.
A Voice needs both a TA and SG resource to be added to it.

See

ttspico_sys::pico_addResourceToVoiceDefinition.

pub unsafe fn create_engine(
    voice: Rc<RefCell<Voice>>
) -> Result<Engine, PicoError>
[src]

Creates a Pico Engine for this voice.

Unsafe

Both a TA and a SG Resource need to be loaded and added to a voice before creating an engine. Failing to do so could result in a segmentation fault!

See

ttspico_sys::pico_newEngine.

Trait Implementations

impl Debug for Voice[src]

impl Drop for Voice[src]

impl Eq for Voice[src]

impl PartialEq<Voice> for Voice[src]

impl Send for Voice[src]

Auto Trait Implementations

impl !RefUnwindSafe for Voice

impl !Sync for Voice

impl Unpin for Voice

impl !UnwindSafe for Voice

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.