1.2.6 • Published 4 years ago

@cycle-robot-drivers/speech v1.2.6

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

@cycle-robot-drivers/speech

Cycle.js drivers and action components for speech synthesis and recognition using Web Speech API.

Try the demo at StackBlitz!

Note that this package was tested with Chrome browser (>= 65.0.3325.181) only.

API

SpeechRecognitionAction(sources)

Web Speech API's SpeechRecognition action component.

Params:

  • sources
    • goal: a stream SpeechRecognition properties.
    • cancel: a stream of GoalID.
    • SpeechSynthesis: EventSource for start, end, error, result events.

Return:

  • sinks
    • state: a reducer stream.
    • output: a stream for the SpeechRecognition driver input.
    • result: a stream of action results. result.result is a transcript from the recognition; it will be '' for non-speech inputs.

SpeechSynthesisAction(sources)

Web Speech API's SpeechSynthesis action component.

Params:

  • sources
    • goal: a stream of SpeechSynthesisUtterance properties.
    • cancel: a stream of GoalID.
    • SpeechSynthesis: EventSource for start and end events.

Return:

  • sinks
    • state: a reducer stream.
    • status: a stream of action status.
    • result: a stream of action results. result.result is always null.
    • SpeechSynthesis: a stream for the SpeechSynthesis driver input.

makeSpeechRecognitionDriver()

Web Speech API's SpeechRecognition driver factory.

Return:

  • Driver the SpeechRecognition Cycle.js driver function. It takes a stream of objects containing SpeechRecognition properties and returns a EventSource:

    • EventSource.events(eventName) returns a stream of eventName events from SpeechRecognition.

makeSpeechSynthesisDriver()

Web Speech API's SpeechSynthesis driver factory.

Return:

1.2.6

4 years ago

1.2.5

4 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.1.1

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago

0.0.0

6 years ago