Open topic with navigation

# idol_speech

The `idol_speech` function extracts speech from audio and video files, and places the transcription in the document content. If the task is not successful, the function results in a Lua error. This function requires an IDOL Speech Server.

## Syntax

    idol_speech( document, section [, params] )

## Arguments

Argument | Description
--- | ---
`document` | (LuaDocument) The document on which you want to run the `IdolSpeech` task.
`section` | (string) The name of a section in the CFS configuration file that contains settings for the task.
`params` | (table) A table of additional parameters that configure the task. The table maps parameter names (String) to parameter values. For information about the parameters that you can set, see the following table. For information about how to use named parameters refer to the HPE Connector Framework Server Administration Guide.

## Named Parameters

Named Parameter | Description | Configuration Parameter
--- | --- | ---
`langIdCumStreamParameters` | (table) A table of additional parameters to pass to IDOL Speech Server to configure language identification when you stream audio to Speech Server. The table must map IDOL Speech Server parameter names to values. CFS passes these parameters to the IDOL Speech Server `AddTask` action when it starts the `LangIdCumStream` task. | LangIdCumStreamParameterSection
`langIdCumWavParameters` | (table) A table of additional parameters to pass to IDOL Speech Server to configure language identification when you send audio to Speech Server using a shared folder. The table must map IDOL Speech Server parameter names to values. CFS passes these parameters to the IDOL Speech Server `AddTask` action when it starts the `LangIdCumWav` task. | LangIdCumWavParameterSection
`streamToTextParameters` | (table) A table of additional parameters to pass to IDOL Speech Server to configure speech-to-text when you stream audio to Speech Server. The table must map IDOL Speech Server parameter names to values. CFS passes these parameters to the IDOL Speech Server `AddTask` action when it starts the `StreamToText` task. | StreamToTextParameterSection
`wavToTextParameters` | (table) A table of additional parameters pass to IDOL Speech Server to configure speech-to-text when you send audio to Speech Server using a shared folder. The table must map IDOL Speech Server parameter names to values. CFS passes these parameters to the IDOL Speech Server `AddTask` action when it starts the `WavToText` task. | WavToTextParameterSection

Tip: For information about the parameters that you can set to configure Speech Server, refer to the IDOL Speech Server Reference.

## Examples

The following example sends a document to IDOL Speech Server, and reads settings for the task from the `[IdolSpeechSettings]` section of the CFS configuration file:

    function handler(document)
       idol_speech(document, "IdolSpeechSettings");
       return true;
    end

The following example demonstrates how to send additional configuration options to IDOL Speech Server. This example assumes that you are sending audio to Speech Server through a shared folder:

    local wavToTextParams = {
       CustomLm="autn1:0.3:autn2:0.4",
       TrainedAm="myAcousticModel.am" };

    local langIdCumWavParams = { LangList="EN,FR" };

    idol_speech( document, "IdolSpeechSettings", {
        wavToTextParameters = wavToTextParams,
        langIdCumWavParameters = langIdCumWavParams });

© 2016 Hewlett Packard Enterprise Development LP | Send documentation feedback to HPE Close Send Documentation Feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a web mail client, and send this email to AutonomyTPFeedback@hpe.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_HP_HTML5_bannerTitle.htm