Selezionare una lingua
RSS
Donazioni
Se vuoi aiutare la promozione del Balabolka compera il mio programma Cross+A.

Finchè la gente compera il Cross+A il Balabolka sarà gratuito (freeware). Grazie!

Balabolka Utilità della riga di comando

The utility differs from the desktop application in that it contains no graphical user interface and works only from the command line. This is useful to integrate the Text-To-Speech process to other applications, for example.

Balabolka (Command Line Utility)

Benefits of the command line utility:

  • No installation required.
  • Compact.
  • Flexible and easy to use.
  • Low system requirements.
  • Microsoft Speech API 4 and 5 support.


Download Balabolka (Command Line Utility)


Dimensioni del file: KB
 
Versione: Changelog
 
Tipo di licenza: Freeware
 
Sistema operativo:
 
API: SAPI 4, SAPI 5, Microsoft Speech Platform




Riga di comando

The utility handles various command line parameters to be able to read text aloud or save as an audio file. The command line options use the syntax "balcon [options ...]", all parameters must be separated by a space. Options can appear in any order on the command line so long as they are paired with their related parameters. Use the "balcon -?" command line to get help on the command line syntax and parameters.


-l
Prints the list of available voices.
-g
Prints the list of available audio output devices.
-f file_di_testo
Sets the name of the input text file.
-fl nome_file
Sets the name of the text file with the list of input files (one file name per line).
-w file_wave
Sets the name of the output file in WAV format. If the option is specified, an audio file will be created. Otherwise, text will be read aloud.
-n nome_voce
Sets the voice name (the part of the name will be enough). If the option is not specified, the voice, defined by the option -id, or the default voice of Windows will be used.
-id numero_intero
Sets Language ID for the voice. Language ID is the language code assigned by Microsoft (for example, "1033" or "0x0409" for "English - United States"). The program will choose the first voice with specified Language ID from the list of voices. If the option is not specified, the voice, defined by the option -n, or the default voice of Windows will be used.
-m
Prints the parameters of the voice.
-b numero_intero
Sets the audio output device by its index. The index of the default audio device is 0.
-r testo
Sets the audio output device by its name.
-c
Gets the text input from the clipboard.
-t riga_di_testo
Gets the text input from the command line.
-i
Gets the text input from STDIN.
-o
SAPI 4: not used.
SAPI 5 and Microsoft Speech Platform: writes sound data to STDOUT.
If the option is specified, the option -w is ignored.
-s numero_intero
SAPI 4: sets the speed in a range of 0 to 100 (no default value).
SAPI 5 and Microsoft Speech Platform: sets the speed in a range of -10 to 10 (il valore predefinito è 0).
-p numero_intero
SAPI 4: sets the pitch in a range of 0 to 100 (nessun valore predefinito).
SAPI 5 and Microsoft Speech Platform: sets the pitch in a range of -10 to 10 (il valore predefinito è 0).
-v numero_intero
SAPI 4: not used.
SAPI 5 and Microsoft Speech Platform: sets the volume in a range of 0 to 100 (il valore predefinito è 100).
-e numero_intero
Sets the length of pauses between sentences (in milliseconds). Il valore predefinito è 0.
-a numero_intero
Sets the length of pauses between paragraphs (in milliseconds). Il valore predefinito è 0.
-d nome_file
Uses a dictionary for pronunciation correction (*.BXD, *.REX or *.DIC). The command line may contain few options -d.
-k
Kills other copies of the application in the computer's memory.
-ka
Kills the active copy of the application in the computer's memory.
-pr
Make pause or resume reading aloud by the active copy of the application. The action is the same as for the context menu item "Pause"/"Resume".
-q
Adds the utility to a queue. The application will wait until other copies of the utility have finished.
-lrc
SAPI 4: not used.
SAPI 5 and Microsoft Speech Platform: creates the LRC file (a file format that synchronizes text with an audio file), if the option -w or -o is specified.
-srt
SAPI 4: not used.
SAPI 5 and Microsoft Speech Platform: creates the SRT file (SubRip text file format), if the option -w or -o is specified.
-vs nome_file
SAPI 4: not used.
SAPI 5 and Microsoft Speech Platform: sets the name of output text file with visemes, if the option -w is specified. A viseme is the mouth shape that corresponds to a particular speech sound. SAPI supports the list of 21 visemes. This list is based on the original Disney visemes. The application will create the audio file and then read it aloud to get visemes and their timecodes.
-sub
Text will be processed as subtitles.
The option may be useful, when the options -i or -c are specified.
-tray
Shows the application's icon in the system tray. This allows to view the progress of the task. The context menu item "Stop" can be used to stop the process.
-ln numero_intero
Selects a line from the text file by using of a line number. The line numbering starts at "1". The interval of numbers can be used for selecting of more than one line (for example, "26-34"). The command line may contain few options -ln.
-fr numero_intero
SAPI 4: not used.
SAPI 5 and Microsoft Speech Platform: sets the output audio sampling frequency in kHz (8, 11, 12, 16, 22, 24, 32, 44, 48). If the option is not specified, the default value for the selected voice will be used.
-bt numero_intero
SAPI 4: not used.
SAPI 5 and Microsoft Speech Platform: sets the output audio bit depth (8 or 16). If the option is not specified, the default value for the selected voice will be used.
-ch numero_intero
SAPI 4: not used.
SAPI 5 and Microsoft Speech Platform: sets the output audio channel mode (1 or 2). If the option is not specified, the default value for the selected voice will be used.
-dp
Visualizza le informazioni sullo stato di avanzamento in una finestra console.
-cfg nome_file
Imposta il nome del file di configurazione con le opzioni della riga di comando (un file di testo dove ciascuna riga contiene un'opzione). Se l'opzione non è specificata, viene usato il file balcon.cfg nella stessa cartella dell'utility.
-h
Mostra l'elenco delle opzioni disponibili nella riga di comando.
--encoding codifica o -enc codifica
Sets the input text encoding ("ansi", "utf8" or "unicode"). If the option is not specified, the utility will detect the text encoding.
--silence-begin numero_intero o -sb numero_intero
Sets the length of silence at the beginning of the audio file (in milliseconds). Il valore predefinito è 0.
--silence-end numero_intero o -se numero_intero
Sets the length of silence at the end of the audio file (in milliseconds). Il valore predefinito è 0.
--lrc-length numero_intero
Sets the maximal length of text lines for the LRC file (in characters).
--lrc-fname nome_file
Sets the name of the LRC file. The option may be useful, when the option -o is specified.
--lrc-enc codifica
Sets the encoding for the LRC file ("ansi", "utf8" or "unicode"). Il valore predefinito è "ansi".
--lrc-offset numero_intero
Sets the time shift for the LRC file (in milliseconds).
--lrc-artist testo
Sets the ID tag for the LRC file: artist.
--lrc-album testo
Sets the ID tag for the LRC file: album.
--lrc-title testo
Sets the ID tag for the LRC file: title.
--lrc-author testo
Sets the ID tag for the LRC file: author.
--lrc-creator testo
Sets the ID tag for the LRC file: creator of the LRC file.
--lrc-sent
Inserts blank lines after sentences when creating the LRC file.
--lrc-para
Inserts blank lines after paragraphs when creating the LRC file.
--srt-length numero_intero
Sets the maximal length of text lines for the SRT file (in characters).
--srt-fname nome_file
Sets the name of the SRT file. The option may be useful, when the option -o is specified.
--srt-enc codifica
Sets the encoding for the SRT file ("ansi", "utf8" or "unicode"). Il valore predefinito è "ansi".
--raw
SAPI 4: not used.
SAPI 5 and Microsoft Speech Platform: output is raw PCM; audio data does not contain the WAV header. The option is used together with the option -o.
--ignore-length o -il
SAPI 4: not used.
SAPI 5 and Microsoft Speech Platform: omits the length of data in the WAV header. The option is used together with the option -o.
--sub-format testo
Sets the format of subtitles ("srt", "lrc", "ssa", "ass", "smi" or "vtt"). If the option is not specified, the format will be determined through the file extension.
--sub-fit o -sf
SAPI 4: not used.
SAPI 5 and Microsoft Speech Platform: automatically increases the speed to fit time intervals (when the program converts subtitles to audio file). The application increments the speech rate value step by step, checking whether the text fits within the given time interval or not.
--sub-fit-lib o -sfl
SAPI 4: not used.
SAPI 5 and Microsoft Speech Platform: automatically increases the speed to fit time intervals (when the program converts subtitles to audio file). The SoundTouch library will be used for changing tempo.
--sub-max numero_intero o -sm numero_intero
SAPI 4: not used.
SAPI 5 and Microsoft Speech Platform: sets the maximal speed of speech in a range of -10 to 10 (when the program converts subtitles to audio file). If SoundTouch library is used, the range must be from 110% to 200%.
--delete-file o -df
Removes the text file, when job is done. The option is used together with the option -f.
--ignore-square-brackets o -isb
Ignora il testo tra [parentesi quadre].
--ignore-curly-brackets o -icb
Ignora il testo tra {parentesi graffe}.
--ignore-angle-brackets o -iab
Ignora il testo tra <parentesi angolari>.
--ignore-round-brackets o -irb
Ignora il testo tra (parentesi tonde).
--ignore-url o -iu
Ignore URLs.
--ignore-comments o -ic
Ignore comments in text. Single-line comments start with // and continue until the end of the line. Multiline comments start with /* and end with */.
--voice1-name nome_voce
SAPI 4: not used.
SAPI 5 and Microsoft Speech Platform: sets the additional voice name to read foreign words in text (the part of the name will be enough). The option is used together with the option --voice1-langid. Other voices can be set by options --voice2-name, --voice3-name, etc.
--voice1-langid language_id
Sets the language ID for foreign words in text. The option is used together with the option --voice1-name. The command line may contain more than one option --voice1-langid. Also an option may contain a comma-separated list of IDs.

The list of supported language IDs is based on ISO 639-1 codes: am, ar, az, ba, bg, be, ca, cs, cu, cv, da, de, el, en, es, et, eu, fi, fil, fr, ja, he, hi, hr, hu, hy, it, gn, gu, ka, kk-Cyr, kk-Lat, kn, ko, ky, lo, lt, lv, mk, no, pl, pt, ro, ru, sk, sl, sr-Cyr, sr-Lat, sv, tg, th, tk, tr, tt, uk, zh.
--voice1-rate numero_intero
Sets the rate for the additional voice in a range of -10 to 10 (il valore predefinito è 0).
--voice1-pitch numero_intero
Sets the pitch for the additional voice in a range of -10 to 10 (il valore predefinito è 0).
--voice1-volume numero_intero
Sets the volume for the additional voice in a range of 0 to 100 (il valore predefinito è 100).
--voice1-roman
Use the default voice to read Roman numerals in text. If text with non-Latin characters contains Roman numerals, the application will not change a voice to read them.
--voice1-digit
Use the default voice to read numbers in text. If the option is not specified, the additional voice will read numbers near foreign words.
--voice1-length numero_intero
Set the minimal length of foreign text parts that will be read by the additional voice (in characters).


Esempi

Crea il file di testo VOICE.TXT con l'elenco delle voci installate:

balcon -l > voice.txt



Questo permette di visualizzare le specifiche della voce Microsoft Anna:

balcon -n "Microsoft Anna" -m



Converti il testo da BOOK.TXT in voce e salva come BOOK.WAV:

balcon -f "d:\Text\book.txt" -w "d:\Sound\book.wav" -n Emma



Recupera il testo dagli appunti, applica le regole per la correzione della pronuncia e leggi ad alta voce:

balcon -n Callie -c -d "d:\rex\rules.rex" -d "d:\dic\rules.dic"



Leggi ad alta voce il testo dalla riga di comando utilizzando la velocità e il volume specificati:

balcon -n Emily -t "The text will be read slowly." -s -5 -v 70



Elimina le altre copie dell'applicazione nella RAM:

balcon -k



Converti il testo da STDIN in voce, salva come BOOK.WAV e crea il file BOOK.LRC con il testo sincronizzato:

balcon -w "d:\book.wav" -i -lrc --lrc-length 80 --lrc-title "The Lord of the Rings"



Leggi ad alta voce frasi in inglese e russo con voci diverse:

balcon -f "d:\Text\book.txt" -n Kimberly --voice1-name Tatyana --voice1-langid ru



Converti i sottotitoli in FILM.WAV:

balcon -f "d:\Text\film.srt" -w "d:\Sound\film.wav" -n Laura --sub-fit --sub-max 2

balcon -f "d:\Text\film.srt" -w "d:\Sound\film.wav" -n Laura --sub-fit-lib



Esempio di utilizzo insieme a LAME.EXE:

balcon -f d:\book.txt -n Heather -o --raw | lame -r -s 22.05 -m m -h - d:\book.mp3



Esempio di utilizzo insieme a OGGENC2.EXE:

balcon -f d:\book.txt -n Heather -o -il | oggenc2 --ignorelength - -o d:\book.ogg



Esempio di utilizzo insieme a WMAENCODE.EXE:

balcon -f d:\book.txt -n Heather -o -il | wmaencode - d:\book.wma --ignorelength




File di configurazione

Le opzioni della riga di comando possono essere memorizzate in un file di configurazione denominato "balcon.cfg" nella stessa cartella dell'utilità.

Esempio di file di configurazione:

-f d:\Text\book.txt
-w d:\Sound\book.wav
-n Microsoft Anna
-s 2
-p -1
-v 95
-e 300
-d d:\Dict\rules.bxd
-lrc
--lrc-length 75
--lrc-enc utf8
--lrc-offset 300

L'applicazione combinerà le opzioni del file di configurazione e della riga di comando.




Licenza

Diritto di utilizzo non commerciale del programma:

  • per le persone fisiche: senza alcuna restrizione;
  • per le persone giuridiche: soggetto alle restrizioni riportate nel contratto di licenza del software Balabolka.

L'utilizzo commerciale richiede la previa autorizzazione del titolare del copyright.