Class: String

Inherits:
Object
  • Object
show all
Defined in:
ext/flite4r.c

Instance Method Summary collapse

Instance Method Details

#to_speechObject

:call-seq:

"hello word".to_speech -> "hello world"

Audibly read the string.



32
33
34
35
36
37
# File 'ext/flite4r.c', line 32

static VALUE flite4r_to_speech(VALUE self)
{
  flite_text_to_speech(StringValuePtr(self),v,"play");

  return self;
}

#to_speech_file(filename) ⇒ Object

:call-seq:

"save speech as wav file".to_speech_file("myfile.wav") -> creates wav file "myfile.wav"

Output speech to a wav file.



44
45
46
47
48
# File 'ext/flite4r.c', line 44

static VALUE flite4r_to_speech_file(VALUE self, VALUE filename) {
  flite_text_to_speech(StringValuePtr(self),v,StringValuePtr(filename));

  return self;
}