Share via


Use PromptEdit.exe to Edit Prompt Databases

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

In production environments, use the command-line utility PromptEdit.exe to add or remove entries from prompt databases on a recurring basis ??? sometimes daily, hourly, or on short notice due to transient or emergency conditions.

PromptEdit.exe is installed as part of Speech Server. The default installation path is %ProgramFiles%\Microsoft Office Communications Server 2007 Speech Server\SDK.

To launch PromptEdit.exe

  1. If necessary, in a text editor, create a list of IDs to delete or a tab-delimited list of extractions and corresponding .wav files, one per line.

  2. Save the text file with Unicode encoding.

  3. Click Start, click Run, type cmd, and then click OK.

  4. In the Command Prompt window, browse to the path containing the file PromptEdit.exe.

  5. Enter the appropriate PromptEdit.exe syntax, and then press ENTER.

Syntax

PromptEdit promptdbfile
    [[/?] |
    [/add:"transcription"] [/wave:file.wav] [/remdup [/delrec]] [/noalignfail] |
    [/addfile:file.txt] [/remdup [/delrec]] [/noalignfail] |
    [/del:ID [/delrec]] |
    [/delfile:file.txt [/delrec]]

Parameters

Parameter Definition

promptdbfile

Specifies the .promptdb file to modify.

add

Specifies an extraction, enclosed in quotation marks, to add. For example, "one [two {tag}<ID>] three". The ID is the extraction ID for the extraction. This value is displayed in the Extraction ID column in the Extractions pane. The entries in this column are editable in the Extractions pane.

wave

Specifies a file in .wav format, containing the audio corresponding to the extraction. If necessary, the file name can be in quotation marks.

addfile

Specifies a text file in ANSI or Unicode format containing extractions and corresponding audio files to add to the database. The text file has two tab-delimited entries per line, with each line ending in CRLF. The entries on each line are the extraction to add and the name of the corresponding .wav file. If necessary, the file name can be in quotation marks.

del

Specifies the ID of an extraction to delete from the database.

delfile

Specifies a text file in ANSI or Unicode format containing extraction IDs for extractions to delete from the database. The text file has one ID per line, with each line ending in CRLF. If necessary, the file name can be in quotation marks.

remdup

Specifies the removal of any extractions already in the database that have extraction IDs matching the IDs of any extractions being added.

delrec

Specifies the deletion of the entire recording from the .promptdb file if deletion of an extraction results in an unused recording.

noalignfail

Specifies that if alignment fails on the waveform being imported, the recording should not be added to the database but the results should be sent to the console or log file. If not specified, the speech recognition (SR) engine creates alignments. If the SR engine fails to provide alignments, no alignments are added. Alignment cannot be specified manually.

enum

Enumerates the extractions in the .promptdb file to the standard output device or to the log file. The flags consist of ID and/or text and/or tag in any order joined by the plus (+) sign. Enumeration are tab-separated in the order specified with CRLF separation. For example: ID+tag.

log

Specifies the name of the log file. If necessary, the file name can be in quotation marks.

Example

The following command line adds the transcription "[one {digit}<1>] two three" with its marked extraction with extraction ID 1 and the file 1.wav to Myfile.promptdb. The command removes any other extraction with extraction ID 1. If the transcription has no extractions after the removal of the specified ID, it deletes the transcription and associated .wav file. If alignment fails on the waveform being added, the recording is not added to the prompt database.

Promptedit myfile.promptdb /add:"[one {digit}<1>] two three" /wave:1.wav /remdup /delrec /noalignfail

The following command line adds the extraction [one {digit}<1>] with extraction ID 1 from the file Recording One.wav to Myfile.promptdb. The command removes any other extraction with ID 1.

Promptedit myfile.promptdb /add:"[one {digit}<1>]" /wave:"Recording One.wav" /remdup

The following command line adds the extraction and corresponding .wav files as specified, one pair per line, in the file "some text file.txt" to Myfile.promptdb. The command specifies that the extraction ID for each extraction, followed by the extraction text, is written to Logfile.txt.

Promptedit myfile.promptdb /addfile:"some text file.txt" /enum:ID+text /log:logfile.txt

The following command line deletes the extraction with extraction ID 1 from Myfile.promptdb. If the transcription has no extractions after removal of the specified ID, the transcription and associated .wav file are deleted.

Promptedit myfile.promptdb /del:1 /delrec

The following command line deletes the extractions specified, one per line, in the file ItemsToDelete.txt from Myfile.promptdb. The command specifies that the extraction ID for each extraction in the file is written to the standard output device.

Promptedit myfile.promptdb /delfile:ItemsToDelete.txt /enum:ID

See Also

Other Resources

Prompt Projects and Databases
Develop Prompts with Speech Prompt Tools