- poetry環境
- jq
- python 3.11くらい
OPENAI_API_KEY=ChatGPTのAPIキー
VOICEVOX_URL=http://localhost:50021
$ poetry install
$ poetry shell
$ python download_today_arxiv_summary.py --categories cs.CV math.GT
$ bash ./scripts/launch_voicevox.sh
voicevoxを起動した状態で
$ text-to-voice summary-text --input 入力ファイル --output 出力ファイル --dotenv .env
以下のコマンドで_cache/daily ディレクトリにファイルが生成される
python download_today_arxiv_summary.py --categories cs.CV math.GT
find _cache/daily_summary/ -name "*.json" -type f | while read -r line; do
day="$(basename "$(dirname "$(dirname "$line")")")"
cat="$(basename "$(dirname "$line")")"
id="$(basename "$line" | sed "s/.json$//g")"
output="_cache/daily/$day/$cat/$id.mp3"
if [[ -e "$output" ]]; then
echo skip "$output"
continue
fi
echo start "$output"
text-to-voice summary-text \
--input "$line" --output "$output" --dotenv .env \
--prompt_path ./llm_clis/text_to_voice/prompts/templates/arxiv_summary_v2.j2 \
--tactic sequence
done
- voicevoxを起動する(
bash ./scripts/launch_voicevox.sh
) - 以下のコマンドを実行する
python pdf_to_summary.py --url "https://arxiv.org/pdf/xxxx.yyyyy.pdf" --output _output --voicevox_url http://localhost:50021