From f3eae794ace20d10edc4e970ce6258a47fb3b4d9 Mon Sep 17 00:00:00 2001 From: ben Date: Sat, 4 Mar 2023 22:22:22 +0100 Subject: Remove STT feature (not fully offline) --- tools/speech.sh | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'tools') 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" "$@")" -- cgit v1.2.3