neoTalk
This plugin integrates Web Speech API's speech synthesis capabilities, allowing text-to-speech functionalities and speech recognition within VisualNEO Web applications.
V: 1.3
Description
The neoTalk plugin for VisualNEO Web enables text-to-speech, speech recognition, and audio recording capabilities, allowing applications to interact with users through voice and audio functionalities. This plugin is ideal for applications needing accessible communication, voice-guided interactions, or multimedia content creation. Here’s a comprehensive overview of its key features and usage:
Text-to-Speech (TTS)
The neoTalkSpeak command synthesizes speech from the provided text, allowing customization of the voice, rate, and pitch.
- Command: neoTalkSpeak
- Syntax: neoTalkSpeak "text" "voice" rate pitch
- text: The text to be spoken.
- voice: Name of the voice (leave empty for default).
- rate: Speech rate (0.1 to 10, default 1).
- pitch: Speech pitch (0 to 2, default 1).
Example:
neoTalkSpeak "Hello, welcome to our app!" "" 1 1
This uses the default voice to say the text at a standard rate and pitch.
Pausing, Resuming, and Cancelling Speech
- neoTalkPause: Pauses the ongoing speech.
- Syntax: neoTalkPause
- neoTalkResume: Resumes paused speech.
- Syntax: neoTalkResume
- neoTalkCancel: Cancels all current speech synthesis.
- Syntax: neoTalkCancel
These commands give users control over the text-to-speech playback, allowing for interactive voice guidance.
Retrieving Available Voices
The neoTalkGetVoices command retrieves a list of available voices for text-to-speech, storing them in an array variable.
- Command: neoTalkGetVoices
- Syntax: neoTalkGetVoices returnVar
- returnVar: Array variable to store voice names.
Example:
neoTalkGetVoices "[voiceArray]"
This populates voiceArray with available voice options for use in neoTalkSpeak.
Speech Recognition
The neoTalkStartRecognition command begins speech recognition, converting spoken words into text and storing them in a specified variable.
- Command: neoTalkStartRecognition
- Syntax: neoTalkStartRecognition returnVar continuous lang callBack
- returnVar: Variable to store recognized text.
- continuous: Set to true for continuous recognition (false stops on silence).
- lang: Language code (e.g., "en-US" for English).
- callBack: Optional callback subroutine triggered after recognition.
Example:
neoTalkStartRecognition "[recognizedText]" true "en-US" "onRecognitionComplete"
This starts speech recognition in English, storing the results in recognizedText.
- neoTalkStopRecognition: Stops active speech recognition.
- Syntax: neoTalkStopRecognition
Audio Recording and Playback
The plugin supports recording and playback of audio directly from the user’s microphone.
- Commands:
- neoTalkAudioRecord: Starts recording.
- Syntax: neoTalkAudioRecord saveToVariable callbackSubroutine
- neoTalkAudioStopRecording: Stops the recording and saves it.
- Syntax: neoTalkAudioStopRecording
- neoTalkAudioPlay: Plays back recorded audio.
- Syntax: neoTalkAudioPlay variableName
- neoTalkAudioDownload: Downloads the recording as a .webm file.
- Syntax: neoTalkAudioDownload "fileName" variableName
Example for Recording:
neoTalkAudioRecord "[audioData]" "onRecordComplete"
Practical Applications
The neoTalk plugin is well-suited for:
- Accessible Apps: Text-to-speech for visually impaired users.
- Voice-Guided Navigation: Voice commands for hands-free control.
- Interactive Learning: Speech recognition for language or pronunciation practice.
- Audio Content Creation: Recording and downloading audio for user-generated content.
With text-to-speech, speech recognition, and audio recording, neoTalk enables voice-driven interactions, adding a new layer of accessibility and user engagement to VisualNEO Web applications.
neoTalkSpeak
|
Purpose: |
Speak the provided text using the specified voice, rate, and pitch. |
|
Category: |
neoTalk |
|
Syntax: |
neoTalkSpeak "text" "voice" rate pitch
text Text to speak voice Voice name (left empty for default voice) rate Speech rate (0.1 to 10) Default 1 pitch Speech pitch (0 to 2) Default 1 |
neoTalkPause
|
Purpose: |
Pause ongoing speech synthesis. |
|
Category: |
neoTalk |
|
Syntax: |
neoTalkPause
|
neoTalkResume
|
Purpose: |
Resume paused speech synthesis. |
|
Category: |
neoTalk |
|
Syntax: |
neoTalkResume
|
neoTalkCancel
|
Purpose: |
Cancel all speech synthesis. |
|
Category: |
neoTalk |
|
Syntax: |
neoTalkCancel
|
neoTalkGetVoices
|
Purpose: |
Retrieve all available voices and store them in the specified array. |
|
Category: |
neoTalk |
|
Syntax: |
neoTalkGetVoices returnVar
returnVar Array variable to store voice names |
neoTalkStartRecognition
|
Purpose: |
Start speech recognition (requires user consent to record microphone). It can't work simultaneously with audio recording. |
|
Category: |
neoTalk |
|
Syntax: |
neoTalkStartRecognition returnVar continuous lang callBack
returnVar Variable to store recognized text continuous Continuous recognition (if false stops on silence) lang Language code (default 'en-US') callBack Callback subroutine (optional) |
neoTalkStopRecognition
|
Purpose: |
Stop speech recognition. |
|
Category: |
neoTalk |
|
Syntax: |
neoTalkStopRecognition
|
neoTalkAudioRecord
|
Purpose: |
Start recording audio from the user's microphone (requires user consent to record microphone). It can't work simultaneously with speech recognition. |
|
Category: |
neoTalk |
|
Syntax: |
neoTalkAudioRecord saveToVariable callbackSubroutine
saveToVariable Variable to store the recorded sound (Base64 encoded) callbackSubroutine Callback subroutine (optional) |
neoTalkAudioStopRecording
|
Purpose: |
Stop the current audio recording session and save the recording. |
|
Category: |
neoTalk |
|
Syntax: |
neoTalkAudioStopRecording
|
neoTalkAudioPlay
|
Purpose: |
Play the recorded audio. |
|
Category: |
neoTalk |
|
Syntax: |
neoTalkAudioPlay variableName
variableName Variable with stored recorded audio |
neoTalkAudioDownload
|
Purpose: |
Save the last recorded audio as a .webm audio file. |
|
Category: |
neoTalk |
|
Syntax: |
neoTalkAudioDownload "fileName" variableName
fileName File name (.webm will be added automatically) variableName Variable with stored recorded audio |
Created with the Personal Edition of HelpNDoc: Streamline Your Documentation Creation with a Help Authoring Tool