Try the demo at https://paperwave.app
This repository contains the source code for the PaperWave CLI. PaperWave was developed as a research project. You can read the paper here.
Webapp is available at PaperWave Web.
Yuchi Yahagi, Rintaro Chujo, Yuga Harada, Changyo Han, Kohei Sugiyama, and Takeshi Naemura. 2024. PaperWave: Listening to Research Papers as Conversational Podcasts Scripted by LLM. https://doi.org/10.48550/arXiv.2410.15023
@misc{Yahagi.2024.PaperWaveListeningResearchPapers,
title = {PaperWave: Listening to Research Papers as Conversational Podcasts Scripted by LLM},
author = {Yahagi, Yuchi and Chujo, Rintaro and Harada, Yuga and Han, Changyo and Sugiyama, Kohei and Naemura, Takeshi},
year = {2024},
number = {arXiv:2410.15023},
eprint = {2410.15023},
publisher = {arXiv},
doi = {10.48550/arXiv.2410.15023},
}LGPL-3.0. See LICENSE, COPYING, and COPYING.LESSER for more information.
The recommended package manager for PaperWave CLI is pnpm, but you may use other package managers.
- Install pnpm using the standalone script
- You can use
pnpm envto switch between Node.js versions by pnpm if you install by standalone script
- You can use
- Restart your terminal app
- Install Node.js v20 (LTS)
pnpm env use --global lts - Install corepack
pnpm add -g corepack - Clone this repository
git clone https://github.com/nae-lab/paperwave-cli.git - Change directory to the repository
cd paperwave-cli- Edit the
.envfile to set your API key and other environment variables
- Edit the
- Install dependencies
pnpm install
To see available options, run:
pnpm main --help- You can place your BGM and PDF files in any folder (e.g.
assets/)
pnpm main --llm-model="gpt-4o" --tts-concurrency=15 --assistant-concurrency=5 --bgm="assets/podcast-jazz-music.mp3" --bgm-volume=0.25 --minute=15 --papers="assets/Yahagi_et_al_2020_Suppression_of_floating_image_degradation_using_a_mechanical_vibration_of_a.pdf"In addition to the CLI setup, you need to:
- Place the Firebase service account key file at
./paperwave-firebase-adminsdk.json - Set up the environment variables
- Edit the
.envfile to set your key file path - Set Firestore collection IDs in the
.envfile
- Edit the
pnpm server --helppnpm server --log=debugYou can build and run the PaperWave CLI and server using Docker.
- grep
- cut
In addition to the CLI and server setup, you need to:
- Set up the environment variables
- Edit the
.envfile to set your Docker registry (e.g. region-docker.pkg.dev/project-name/repo-name/image-name)
- Edit the
Before building the docker image, you need to increment the version in the package.json file.
pnpm docker:build # Build docker image
pnpm docker:push # Push docker image to registry
# ! create-gce-with-container.sh is not included in the repository!
./scripts/create-gce-with-container.sh dev|production # Create GCE instance with the pushed imagescripts/create-azure-container.sh- Create containerscripts/azure-container-logs.sh- View logsscripts/azure-container-status.sh- View statusscripts/azure-container-delete.sh- Delete containerscripts/azure-container-list.sh- List containers
scripts/env-utils.js- Load and debug environment variablesscripts/load-azure-env.sh- Load common environment variables for Azure scripts
Create a .env file and set the required environment variables. Example:
# OpenAI API settings
OPENAI_API_KEY=your_openai_api_key
# Azure OpenAI settings
AZURE_SWEDEN_CENTRAL_OPENAI_API_VERSION=2025-01-01-preview
AZURE_SWEDEN_CENTRAL_OPENAI_API_KEY=your_azure_openai_key
AZURE_SWEDEN_CENTRAL_OPENAI_ENDPOINT=https://your-resource.openai.azure.com
# Azure Container Registry settings
ACR_LOGIN_SERVER=your-registry.azurecr.io
ACR_USERNAME=your_username
ACR_PASSWORD=your_password
# Azure settings
AZURE_RESOURCE_GROUP=your-resource-group
# Slack settings
SLACK_TOKEN=your_slack_token
SLACK_ALERT_CHANNEL_ID=your_channel_id# Direct execution
npx ts-node src/index.ts
# With arguments
npx ts-node src/index.ts productionpnpm build