Speech
6 nodes
On this page 6
Align Speech
FunctionFinds when each word of a known text was said in a clip of it being read, and each of the word's sounds - for subtitles, karaoke and lip sync.
Signature
AlignSpeech -> (Words: Aligned Word Array, phones: Aligned Phone Array)
audio: AudioBuffer
text: TextAlignedWord[] AlignSpeech(
AudioBuffer audio,
string text,
out AlignedPhone[] phones)Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The speech to align. |
| text | Text | — | What the speech says, word for word. |
Returns
| Words | Aligned Word Array |
| phones | Aligned Phone Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Speech
- Package
- Audio Processing
Find Speech
FunctionFinds the stretches of a clip in which somebody is talking, leaving out the pauses, silence and noise between them.
Signature
FindSpeech -> Speech Interval Array
audio: AudioBuffer
strictness: Speech StrictnessSpeechInterval[] FindSpeech(
AudioBuffer audio,
SpeechStrictness strictness = SpeechStrictness.Loose)Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The clip to search. |
| strictness | Speech Strictness | Loose | How readily a stretch of sound is called speech: Loose keeps quiet words and a little noise, Strict only clear talking. |
Returns
| Intervals | Speech Interval Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Speech
- Package
- Audio Processing
Recognize Speech
FunctionHears which of a list of phrases is said in a clip - or what a grammar allows - and when each word was said.
Signature
RecognizeSpeech -> (Text: Text, words: Spoken Word Array)
audio: AudioBuffer
phrases: Textstring RecognizeSpeech(
AudioBuffer audio,
string phrases,
out SpokenWord[] words)Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The speech to hear. |
| phrases | Text | — | What may be said: phrases separated by | or on lines of their own, or a whole JSGF grammar. |
Returns
| Text | Text |
| words | Spoken Word Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Speech
- Package
- Audio Processing
Speak
FunctionSpeaks a phrase written in ARPABET phonemes - HH AH0 L OW1 is "hello" - with a recorded human voice.
Signature
Speak(phonemes: Text, pitch: Number) -> AudioBuffer
AudioBuffer Speak(
string phonemes = "HH AH0 L OW1",
double pitch = 120)Parameters
| name | type | default | description |
|---|---|---|---|
| phonemes | Text | HH AH0 L OW1 | The phrase, in ARPABET. |
| pitch | Number | 120 | The voice's pitch, in hertz; 95 is this voice's own, around 120 a little higher, 220 a high voice. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Speech
- Package
- Audio Processing
Speak Text
FunctionReads English text aloud with a recorded human voice.
Signature
SpeakText -> AudioBuffer
text: Text
pitch: Number
speed: NumberAudioBuffer SpeakText(
string text = "Hello, world.",
double pitch = 95,
double speed = 1)Parameters
| name | type | default | description |
|---|---|---|---|
| text | Text | Hello, world. | What to say. |
| pitch | Number | 95 | The voice's pitch, in hertz; 95 is this voice's own. |
| speed | Number | 1 | How fast to speak: 1 is the voice's own pace, 2 twice as fast, 0.5 half. |
Returns
| Audio | AudioBuffer |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Speech
- Package
- Audio Processing
Spot Keywords
FunctionFinds where key phrases are said in a stretch of speech - "hey computer" in a conversation - and when.
Signature
SpotKeywords -> Key Phrase Detection Array
audio: AudioBuffer
keyPhrases: Text
threshold: NumberKeyPhraseDetection[] SpotKeywords(
AudioBuffer audio,
string keyPhrases = "hello",
double threshold = 0)Parameters
| name | type | default | description |
|---|---|---|---|
| audio | AudioBuffer | — | The speech to search. |
| keyPhrases | Text | hello | The phrases to find, separated by | or on lines of their own. |
| threshold | Number | 0 | How sure a detection must be, as a power of ten: -20 is 1e-20; lower finds more. 0 uses PocketSphinx's own, 1e-30. |
Returns
| Detections | Key Phrase Detection Array |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Speech
- Package
- Audio Processing