aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/speech.sh26
1 files changed, 0 insertions, 26 deletions
diff --git a/tools/speech.sh b/tools/speech.sh
index 1b62fbe..8ad7de2 100755
--- a/tools/speech.sh
+++ b/tools/speech.sh
@@ -24,7 +24,6 @@ if [[ -z "${LLM_API_KEY}" ]]; then
fi
tts_host=${TTS_API_HOST:-"http://localhost:8000"}
-stt_host=${STT_API_HOST:-"http://localhost:8001"}
_choice_voice() {
@@ -70,33 +69,8 @@ synthesize() {
echo "Audio file ${argc_filename} generated successfully."
}
-_choice_source() {
- pactl list short sources | awk '{print $2}'
-}
-
_choice_lang() {
echo 'af', 'am', 'ar', 'as', 'az', 'ba', 'be', 'bg', 'bn', 'bo', 'br', 'bs', 'ca', 'cs', 'cy', 'da', 'de', 'el', 'en', 'es', 'et', 'eu', 'fa', 'fi', 'fo', 'fr', 'gl', 'gu', 'ha', 'haw', 'he', 'hi', 'hr', 'ht', 'hu', 'hy', 'id', 'is', 'it', 'ja', 'jw', 'ka', 'kk', 'km', 'kn', 'ko', 'la', 'lb', 'ln', 'lo', 'lt', 'lv', 'mg', 'mi', 'mk', 'ml', 'mn', 'mr', 'ms', 'mt', 'my', 'ne', 'nl', 'nn', 'no', 'oc', 'pa', 'pl', 'ps', 'pt', 'ro', 'ru', 'sa', 'sd', 'si', 'sk', 'sl', 'sn', 'so', 'sq', 'sr', 'su', 'sv', 'sw', 'ta', 'te', 'tg', 'th', 'tk', 'tl', 'tr', 'tt', 'uk', 'ur', 'uz', 'vi', 'yi', 'yo', 'yue', 'zh' | sed 's/, /\n/g'
}
-# @cmd
-# @option -s --source![`_choice_source`] Set the voice
-# @option -f --filename=record.wav Set the output filename
-record() {
- parec -d "${argc_source}" --file-format=wav "${argc_filename}"
-}
-
-# @cmd
-# @option -l --lang![`_choice_lang`] Set the language
-# @option -f --filename! Set the output filename
-transcript() {
- # Transcribe the specified file
- echo "Transcribing file ${argc_filename}, be patient"
- curl "${stt_host}/v1/audio/transcriptions" -H "Authorization: Bearer ${LLM_API_KEY}" \
- -F "file=@${argc_filename}" \
- -F "stream=true" \
- -F "language=${argc_lang}"
- echo
-
-}
-
eval "$(argc --argc-eval "$0" "$@")"