Page 1 of 1

Terminal/Command-Line help for Mac, Linux, and Windows

PostPosted: Tue Jun 24, 2008 1:19 pm
by Paul
This list of information was generated within a Linux terminal although all of the commands listed should work for all operating systems.

For Windows operating systems: The Windows Command-Line prompt can be accessed by clicking the 'Start' button which is normally at the bottom left of the desktop, then click 'Run' then type ' cmd.exe ' within the text field excluding the single quotation marks, then press enter and the Windows Command-Line prompt will open in a new window.

For Mac and Linux operating systems: Simply open the terminal which should be located on the desktop to use these commands.

Code: Select all
Usage: swift [OPTIONS...] [STRINGS | FILES...]

    The "swift" application is a command-line utility for Text-to-Speech
    synthesis.  Given text or Speech Synthesis Markup Language (SSML), it
    can render audio containing the material as spoken content to file or.
    to an audio device.

    Options:

        -n <string>  Specify a voice by name to use as the current voice.
                     This has precedence over the "-d" option.

        -d <string>  Specify a path to a directory containing a valid voice to
                     use as the current voice

        -f <list>    Synthesize text files or play audio in <list>.  To
                     use standard input, use "-f -".  Multiple file names
                     may be given.  Without the "-f" switch, the default
                     is to synthesize text arguments on the command line.
                     When taking input from a pipe, the engine will always
                     treat two newlines as an input delimeter, and start
                     speaking text up to that point without waiting for the
                     end of the file.

        -o <string>  Write output to file specified.  Without this option,
                     the default is to output to the default local audio
                     device.

        -m <string>  Mode to assume for input: one of "text", "ssml",
                     "phone", or "wave".  The default is "ssml".

        -e <string>  Text Encoding to assume for input.  Common encoding types
                     include: "utf-8", "utf-16", "iso8859-1", "iso8859-15",
                     and "us-ascii".  The default is "us-ascii".
                     Note: This does not cause swift to convert text to the
                     specified encoding, but rather tells swift to expect the
                     input text to be of the specified encoding.

        -x <string>  Read a file containing special effects (SFX) filters to
                     be applied to the output audio. Overrides any default.sfx
                     file in the voice's directory.

        -p <string>  Set Swift TTS Engine parameters.  Multiple parameters can
                     be specified as a comma-delimited string.  For a list of
                     available paramters, run 'swift --params'.  Syntax:
                     PARAM=VALUE[,PARAM=VALUE...]

        -l <string>  Load lexicon entries from the specified file.  These
                     entries are appended to the voice's internal lexicon and
                     those from the voice's lexicon.txt file.  In the event of
                     repeated entries, those found in this file override those
                     found in the voice's lexicon.txt file and the voice's
                     internal lexicon.

        -t           Display sentence text as it is synthesized.

        -V           Display copyright and version information for Swift, the
                     current voice, and the language and lexicon components
                     used by the current voice. You can use the -n and -d
                     options to use a particular voice.  Otherwise, the
                     default voice is used.

        --events             Display a table of synthesis events.

        --help               Display a usage message, including descriptions
                             of all available options and usage examples.

        --params             List and describe all Swift TTS Engine parameters
                             available for use with the -p option.

        --voices             Display a table containing all available voices
                             on the system, including columns for the voice
                             name, version, license status, gender, age,
                             language, and sample-rate of each voice.

        --search <string>    Search for voices matching string.

        --order  <string>    Loosely sort voices based on string criteria.
                             Voices matching string are placed at the top of
                             the list of voices.

                             The following can be used as search and order
                             criteria:
                                - name
                                - path
                                - version
                                - sample-rate
                                - license/key
                                - language/tag
                                - language/name
                                - language/version
                                - lexicon/name
                                - lexicon/version
                                - speaker/name
                                - speaker/gender
                                - speaker/age

                             To provide multiple criteria for search or order,
                             provide them as a semicolon-seperated list, such
                             as "speaker/gender=male;speaker/age=30"

        --say-prgm-version   Synthesize version information for Swift TTS
                             using the current voice.  You can specify the -n
                             and -d options to use a particular voice.
                             Otherwise, the default voice is used.

        --say-voice-version  Synthesize voice name, language, and version for
                             the  current  voice, using the current voice.
                             You can specify the -n and -d options to use a
                             particular  voice.  Otherwise, the default voice
                             is used.

        --say-all-voices     Synthesize  voice name, language and version of
                             every voice found on the system, using each voice
                             to announce itself.  A table containing this
                             information is printed to the screen as the
                             voices are announced.

        --reg-voice          Enter a voice license key.  This may be used
                             with the "-n" or "-d" options to specify a
                             voice to license, or with the Additional
                             Licensing Options shown below.

        --reg-ports          Enter a concurrency license key to allow for
                             simultaneous speech synthesis.  This may be used
                             with the Additional Licensing Options shown below.

    Additional Licensing Options:

        These additional options are supplemental to the --reg-voice
        and --reg-ports options.

        --customer-name <string>  Used with --reg-voice or --reg-ports.
                                  Your name as it appears in your invoice.

        --company-name  <string>  Used with --reg-voice or --reg-ports.
                                  Your company name as it appears in your
                                  invoice.  If no company name is
                                  specified in your invoice, use:
                                  [--company-name ""].

        --voice-name    <string>  Used with --reg-voice Only.
                                  The name of the voice to license.

        --num-ports     <string>  Used with --reg-ports Only.
                                  Number of ports for concurrency license.
                                  For Unlimited Concurrency, use:
                                  [--num-ports ""].

        --license-key   <string>  Used with --reg-voice or --reg-ports.
                                  Your license key.

    Licensing Examples:

        swift --reg-voice

            Register a voice interactively.

        swift --reg-ports

            Register port concurrency interactively.

        swift --reg-voice --customer-name "John Doe" --company-name
        "Initech" --voice-name David --license-key "XX-XXXXXX-
        XXXXXX-XXXXXX-XXXXXX-XXXXXX"

            Register a voice using command-line parameters.

        swift --reg-ports --customer-name "John Doe" --company-name
        "Initech" --num-ports 96 --license-key XX-XXXXXX-XXXX
        XX-XXXXXX-XXXXXX-XXXXXXX

            Register port concurrency using command-line parameters.

    Examples:

        swift --voices --search "speaker/age=30" --order "sampling-rate=8000"

        swift "Cepstral: We Build Voices."

            Speak the contents of the quoted string.  If the quotation marks
            are not used, the system will concatenate all text into a string
            to synthesize.

        swift -l /path/to/mylex -f /path/to/myfile.ssml

            Add the lexicon in the file "mylex" to the text processing,
            and then render the contents of the SSML file.  The default
            mode for both file and command-line input is SSML.

        swift -n William -m text -f /path/to/file.txt -o file.wav

            Use the voice William, assume the mode is raw "text" rather
            than SSML, render the contents of "myfile.txt" to audio,
            and save it to the given output file.

Cepstral Swift 4.2.0, February 2007.  Copyright (C) Cepstral LLC.


If any assistance is needed please feel free to post a reply within this topic and I will try my best to help.

Re: Terminal/Command-Line help for Mac, Linux, and Windows

PostPosted: Sun Mar 08, 2009 10:03 am
by pavelnl
Could you reveal, please, if there are any hot key combinations during the playback with help of swift utility (especially in -t mode), which could allow to pause (most important) and/or perform paragraph forward/backward operations?
PS: My wife is studying the language so she would the program to assist her.