Speech | lrf.speech

Little Robot Friends have a single, 1/4 watt, 8ohm speaker; this allows them to create a diverse set of sounds. The user can create custom notes or set the speaker to a particular frequency.

Functions called from within the "speech" portion of the library have the prefix of lrf.speech

setFrequency()

Description

This function sets the frequency of the robot's speaker.

Examples

    lrf.speech.setFrequency(2000);

Syntax

    setFrequency(frequency)

Parameters

Returns

none

Notes

none


quiet()

Description

This function interrupts and silences the speaker if it is currently emitting sound.

Examples

    lrf.speech.quiet();

Syntax

    quiet()

Parameters

none

Returns

none

Notes

none


saySound()

Description

This function will play a LRFSound type.

Examples

Basic

    lrf.speech.saySound(mySound);

Advanced

    lrf.speech.saySound(mySound, true);

Syntax

    saySound(sound)
    saySound(sound, blocking)

Parameters

Returns

none

Notes

none


saySounds()

Description

This function

Examples

Basic

    lrf.speech.saySounds(*mySounds, noOfSounds);

Advanced

    lrf.speech.saySounds(*mySounds, noOfSounds, true);

Syntax

    saySounds(sounds, count)
    saySounds(sounds, count, blocking)

Parameters

Returns

none

Notes

none


isSpeaking()

Description

This function returns a value of true if the robot's speaker is currently in use.

Examples

    if (lrf.speech.isSpeaking() == true) {
      lrf.speech.quiet();
    }

Syntax

    isSpeaking()

Parameters

none

Returns

bool

Notes

none