[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81266":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":13,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":14,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":15,"fork":15,"defaultBranch":16,"hasWiki":17,"hasPages":15,"topics":18,"createdAt":8,"pushedAt":8,"updatedAt":19,"readmeContent":20,"aiSummary":21,"trendingCount":13,"starSnapshotCount":13,"syncStatus":22,"lastSyncTime":23,"discoverSource":24},81266,"KJAudioBook-v1","kentjuno\u002FKJAudioBook-v1","kentjuno",null,"TypeScript",49,62,1,0,39.4,false,"main",true,[],"2026-06-12 04:01:32","# AudioBook KJ\n\n\u003Ca id=\"top\">\u003C\u002Fa>\n\n[English](#english) | [Tiếng Việt](#tieng-viet) | [Prerequisites](#prerequisites) | [Gemini CLI](#gemini-cli-setup) | [Chrome Extension](#chrome-flowkit-extension-setup) | [AI Agent Prompt](#ai-agent-setup-prompt)\n\n\u003Ca id=\"english\">\u003C\u002Fa>\n\n![AudioBook KJ hero](docs\u002Fassets\u002Freadme\u002Fhero-audiobook-kj.jpg)\n\nSource-only public snapshot for reference, experimentation, and learning.\n\nThis repository intentionally excludes generated media, local databases, virtual environments, node modules, private voice references, planning notes, and manuscript\u002Freference content. The code may need local adjustment before it runs on another machine.\n\n## One-Click Start For Windows\n\nFor non-technical users on Windows:\n\n1. Download this repo as a ZIP or clone it.\n2. Extract the ZIP.\n3. Double-click:\n\n```text\nSTART_HERE.bat\n```\n\nThe launcher will check for Git, Node.js, npm, Python, and FFmpeg. If something is missing, it will offer to install it with `winget`. Then it installs frontend\u002Fbackend dependencies, creates the Python virtual environment, starts the backend, starts the frontend, and opens the browser.\n\nNotes:\n\n- Keep the backend and frontend terminal windows open while using the app.\n- Backend AI\u002FTTS dependencies can be large and may take a long time to install.\n- If `winget` installs a tool but the launcher still cannot find it, close the terminal and run `START_HERE.bat` again.\n- Gemini CLI and the Chrome FlowKit extension are still optional and described below.\n\n## What Is This?\n\nAudioBook KJ is an experimental AI audiobook\u002Fvideo studio. The goal is to explore a workflow where long-form text can be cleaned, structured, converted into narrated audio, arranged on a media timeline, connected with generated visual assets, and exported as an audiobook\u002Fvideo project.\n\nThis is not a polished production app. It is a public source snapshot for people who want to study the architecture, borrow ideas, or see how a React frontend, Python backend, AI helpers, audio processing, and a Chrome extension can be wired together.\n\n## App Workflows\n\nThe project is built around these rough workflows:\n\n1. **Script import and cleanup**\n\n   Bring text\u002Fscript content into the app, clean markdown, split long content into chunks, and optionally call Gemini CLI helper flows to rewrite, enhance, or normalize script sections.\n\n2. **AI direction and metadata**\n\n   Extract useful entities, character references, scene hints, and storyboard-like metadata. These helpers are experimental and may require Gemini CLI.\n\n3. **Text-to-speech generation**\n\n   Convert script lines into audio clips using the Python backend and local TTS\u002Fmodel tooling. Private voice reference files are intentionally not included in this public repo.\n\n4. **Audio timeline and mixing**\n\n   Arrange narration, music, and sound effect clips; mix audio with Python tools such as pydub; use FFmpeg where export or media rendering requires it.\n\n5. **Video\u002Fvisual asset workflow**\n\n   Manage generated or imported visual assets and connect them to scenes\u002Ftimeline clips. Generated images and videos are excluded from the public repo.\n\n6. **FlowKit browser bridge**\n\n   The local Chrome extension can bridge browser-based Google Flow workflows with the local backend. This part is experimental and should be reviewed carefully before use.\n\n7. **Export**\n\n   Combine audio\u002Fvideo assets into final outputs. Exported media is ignored by Git to keep the repo small and clean.\n\nIn short: the repo is a playground for building an AI-assisted audiobook\u002Fvideo production pipeline, not a ready-to-sell product.\n\n## Prerequisites\n\nInstall these before trying to run the app:\n\n- **Git**: required to clone the repository.\n- **Node.js 20.19+ or 22.12+**: required by the Vite\u002FReact frontend.\n- **npm**: included with Node.js; used inside `frontend\u002F`.\n- **Python 3.10 or 3.11**: recommended for the backend and AI\u002Faudio dependencies.\n- **FFmpeg**: required for audio\u002Fvideo mixing and export features.\n- **Google Chrome or Chromium**: required if using the bundled FlowKit browser extension.\n- **Gemini CLI**: optional, but required for script\u002Fstoryboard helper flows that call `gemini`.\n- **CUDA-capable GPU + NVIDIA drivers**: optional, but strongly recommended for local TTS\u002Fmodel generation with Torch\u002FOmniVoice.\n\nUseful Windows install examples:\n\n```powershell\nwinget install Git.Git\nwinget install OpenJS.NodeJS.LTS\nwinget install Python.Python.3.11\nwinget install Gyan.FFmpeg\nwinget install Google.Chrome\n```\n\nAfter installing, open a new terminal and verify:\n\n```powershell\ngit --version\nnode --version\nnpm --version\npython --version\nffmpeg -version\n```\n\nOptional Gemini CLI setup depends on your local AI tooling\u002Faccount. If `gemini --version` fails, skip Gemini-related features or ask an AI agent to help install\u002Fconfigure it.\n\n## Gemini CLI Setup\n\nSome backend helper flows call the `gemini` command directly, especially script cleanup, prompt enhancement, entity extraction, and storyboard generation helpers. Install Gemini CLI only if you want to use those features.\n\nOfficial install options:\n\n```powershell\nnpm install -g @google\u002Fgemini-cli\n```\n\nOr run without a global install:\n\n```powershell\nnpx https:\u002F\u002Fgithub.com\u002Fgoogle-gemini\u002Fgemini-cli\n```\n\nVerify the command is available:\n\n```powershell\ngemini --version\n```\n\nFirst-run setup:\n\n```powershell\ngemini\n```\n\nThen follow the login\u002Fauth prompts from Gemini CLI. If your terminal cannot find `gemini`, close and reopen the terminal, then check:\n\n```powershell\nnpm config get prefix\nnpm bin -g\n```\n\nMake sure the global npm binary folder is on your `PATH`.\n\nNotes:\n\n- Use the official npm package name: `@google\u002Fgemini-cli`.\n- Do not install similarly named unofficial packages.\n- The code in this repo uses commands like `gemini --skip-trust`; review Gemini CLI permissions and trust prompts before letting it modify files.\n- If Gemini CLI is not installed, the main frontend can still be inspected, but Gemini-powered helper endpoints may fail.\n\n## Chrome FlowKit Extension Setup\n\n![FlowKit extension workflow](docs\u002Fassets\u002Freadme\u002Fflowkit-extension-workflow.jpg)\n\nThe repo includes a local unpacked Chrome extension at:\n\n```text\naudiobook_builder\u002Fflowkit_extension\n```\n\nIt is designed as a local bridge for Google Flow-related workflows. It expects the local backend to be running and may interact with:\n\n- `https:\u002F\u002Flabs.google\u002Ffx\u002Ftools\u002Fflow`\n- `https:\u002F\u002Faisandbox-pa.googleapis.com`\n- local backend WebSocket\u002FAPI routes\n\nInstall it in Chrome:\n\n1. Open Chrome.\n2. Go to `chrome:\u002F\u002Fextensions`.\n3. Enable **Developer mode**.\n4. Click **Load unpacked**.\n5. Select the folder `audiobook_builder\u002Fflowkit_extension`.\n6. Pin the **Flow Kit** extension if you want quick access.\n7. Start the backend with `python server.py`.\n8. Open `https:\u002F\u002Flabs.google\u002Ffx\u002Ftools\u002Fflow` if you want to use Flow-related features.\n\nIf Chrome refuses to load it:\n\n- Confirm `manifest.json` exists inside `audiobook_builder\u002Fflowkit_extension`.\n- Reload the extension from `chrome:\u002F\u002Fextensions`.\n- Check the extension error panel for missing files or permission warnings.\n- Make sure the backend is running on the expected local port before using bridge features.\n\nImportant:\n\n- This extension is for local experimentation.\n- It requests broad browser permissions because it bridges local tooling and Google Flow requests.\n- Review `manifest.json`, `background.js`, and `side_panel.js` before using it with a personal Google account.\n- Do not publish personal tokens, cookies, generated media, or local DB files.\n\n## References\n\nUse these links to understand the tools and libraries used in this project.\n\nCore tooling:\n\n- [Git documentation](https:\u002F\u002Fgit-scm.com\u002Fdoc)\n- [Node.js downloads](https:\u002F\u002Fnodejs.org\u002Fen\u002Fdownload)\n- [npm documentation](https:\u002F\u002Fdocs.npmjs.com\u002F)\n- [Python documentation](https:\u002F\u002Fdocs.python.org\u002F3\u002F)\n- [FFmpeg documentation](https:\u002F\u002Fwww.ffmpeg.org\u002Fdocumentation.html)\n\nFrontend:\n\n- [React documentation](https:\u002F\u002Freact.dev\u002F)\n- [Vite documentation](https:\u002F\u002Fvite.dev\u002Fguide\u002F)\n- [Tailwind CSS documentation](https:\u002F\u002Ftailwindcss.com\u002Fdocs)\n- [TanStack Query documentation](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Fframework\u002Freact\u002Foverview)\n- [React Flow documentation](https:\u002F\u002Freactflow.dev\u002F)\n- [Axios documentation](https:\u002F\u002Faxios-http.com\u002Fdocs\u002Fintro)\n- [Lucide React icons](https:\u002F\u002Flucide.dev\u002Fguide\u002Fpackages\u002Flucide-react)\n\nBackend and API:\n\n- [FastAPI documentation](https:\u002F\u002Ffastapi.tiangolo.com\u002F)\n- [Uvicorn documentation](https:\u002F\u002Fwww.uvicorn.org\u002F)\n- [Python multipart package](https:\u002F\u002Fgithub.com\u002FKludex\u002Fpython-multipart)\n\nAI and audio:\n\n- [PyTorch documentation](https:\u002F\u002Fdocs.pytorch.org\u002Fdocs\u002Fstable\u002Findex.html)\n- [PyTorch install selector](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F)\n- [Torchaudio documentation](https:\u002F\u002Fdocs.pytorch.org\u002Faudio\u002Fstable\u002Findex.html)\n- [Hugging Face Transformers documentation](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Findex)\n- [Hugging Face Hub Python library](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Findex)\n- [python-soundfile documentation](https:\u002F\u002Fpython-soundfile.readthedocs.io\u002F)\n- [pydub GitHub repository](https:\u002F\u002Fgithub.com\u002Fjiaaro\u002Fpydub)\n- [OmniVoice GitHub repository](https:\u002F\u002Fgithub.com\u002Fk2-fsa\u002FOmniVoice)\n- [OmniVoice model on Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fk2-fsa\u002FOmniVoice)\n\nGemini and browser extension:\n\n- [Gemini CLI GitHub repository](https:\u002F\u002Fgithub.com\u002Fgoogle-gemini\u002Fgemini-cli)\n- [Gemini CLI getting started docs](https:\u002F\u002Fgithub.com\u002Fgoogle-gemini\u002Fgemini-cli\u002Fblob\u002Fmain\u002Fdocs\u002Fget-started\u002Findex.md)\n- [Chrome Extensions documentation](https:\u002F\u002Fdeveloper.chrome.com\u002Fdocs\u002Fextensions)\n- [Chrome Extensions getting started](https:\u002F\u002Fdeveloper.chrome.com\u002Fdocs\u002Fextensions\u002Fmv3\u002Fgetstarted)\n- [Google Flow](https:\u002F\u002Flabs.google\u002Ffx\u002Ftools\u002Fflow)\n\n## Acknowledgements\n\n- Thanks to [crisng95\u002Fflowkit](https:\u002F\u002Fgithub.com\u002Fcrisng95\u002Fflowkit) for the FlowKit extension idea\u002Freference.\n\n## Donate \u002F Support\n\nIf this repo gives you ideas, saves you time, or helps you build your own AI media workflow, donations are welcome.\n\nSupport gives me more time to clean up version 1, write better docs, fix rough edges, and add more useful features. If the project gets enough support, I may also public a more polished version 2 later.\n\n\u003Cimg src=\"docs\u002Fassets\u002Freadme\u002Fdonate-vietqr.jpg\" alt=\"Donate with VietQR\" width=\"360\" \u002F>\n\nNo pressure though. Starring the repo, sharing feedback, opening issues, or showing what you build from it also helps a lot.\n\n## AI Agent Setup Prompt\n\nCopy this prompt into any coding AI agent after cloning the repository:\n\n```text\nYou are helping me set up and run this cloned project locally.\n\nGoal:\n- Inspect the repository structure first.\n- Verify the required system software is installed before installing project dependencies.\n- Identify the backend, frontend, package managers, runtime versions, and entry points.\n- Install only the dependencies needed to run the source code.\n- Recreate ignored\u002Fgenerated folders only when needed.\n- Do not restore private assets, voice samples, generated audio\u002Fvideo, local databases, node_modules, virtual environments, or planning\u002Fmanuscript files.\n- Prefer safe local setup steps and explain any command before running it.\n\nRepository context:\n- This is a source-only public snapshot.\n- Some assets and generated files were intentionally removed by .gitignore.\n- The project is not guaranteed to run immediately after clone.\n- Treat missing media\u002Foutput files as expected.\n- Use placeholder environment variables for secrets\u002FAPI keys.\n- Frontend likely needs Node.js 20.19+ or 22.12+ because it uses a modern Vite stack.\n- Backend likely needs Python 3.10\u002F3.11, FFmpeg, FastAPI\u002FUvicorn, Torch, Transformers, Hugging Face tooling, pydub, soundfile, and OmniVoice.\n- Gemini CLI and Chrome\u002FChromium are optional unless I want to use Gemini helper flows or the FlowKit extension.\n- Gemini CLI can be installed with `npm install -g @google\u002Fgemini-cli`; verify with `gemini --version`.\n- The Chrome extension can be loaded unpacked from `audiobook_builder\u002Fflowkit_extension` via `chrome:\u002F\u002Fextensions`.\n- On Windows, try `START_HERE.bat` first for one-click setup and launch.\n\nSuggested workflow:\n1. Check `git`, `node`, `npm`, `python`, and `ffmpeg` versions.\n2. On Windows, inspect and consider using `START_HERE.bat` for one-click setup.\n3. If Gemini features are requested, check `gemini --version`; otherwise mark Gemini as optional.\n4. If FlowKit browser features are requested, explain how to load the Chrome extension from `audiobook_builder\u002Fflowkit_extension`.\n5. Read README files, package files, requirements files, and obvious app entry points.\n6. Check the frontend folder for package.json and install frontend dependencies.\n7. Check the audiobook_builder folder for Python requirements and create a local virtual environment.\n8. Look for .env usage and create a local .env.example or .env only with placeholders.\n9. Start backend and frontend separately if applicable.\n10. If startup fails because ignored assets or databases are missing, create minimal placeholders or explain what is missing.\n11. Summarize the final setup commands and how to run the app.\n\nConstraints:\n- Do not commit secrets.\n- Do not download large model\u002Fmedia files unless I explicitly approve.\n- Do not add generated outputs to Git.\n- Keep changes small and focused on local setup.\n\nPlease begin by listing the detected project structure and then propose the exact setup commands for my machine.\n```\n\n## Likely Local Setup\n\n![AudioBook KJ setup flow](docs\u002Fassets\u002Freadme\u002Fsetup-flow.jpg)\n\nThe project appears to contain:\n\n- `frontend\u002F`: Vite\u002FReact frontend.\n- `audiobook_builder\u002F`: Python backend and audiobook tooling.\n\nTypical commands an AI agent may try after inspection:\n\n```powershell\ncd frontend\nnpm install\nnpm run dev\n```\n\n```powershell\ncd audiobook_builder\npython -m venv venv\n.\\venv\\Scripts\\Activate.ps1\npip install -r requirements.txt\npip install fastapi uvicorn python-multipart\npython server.py\n```\n\nThese commands are starting points only. Let the AI agent inspect the current machine and adjust them.\n\n---\n\n\u003Ca id=\"tieng-viet\">\u003C\u002Fa>\n\n# AudioBook KJ - Bản Tiếng Việt\n\n[English](#english) | [Tiếng Việt](#tieng-viet) | [Phần Mềm Cần Cài](#phan-mem-can-cai-truoc) | [Cài Gemini CLI](#cai-gemini-cli) | [Cài Extension](#cai-chrome-extension-flowkit) | [Prompt AI Agent](#prompt-tieng-viet-cho-ai-agent) | [Lên đầu trang](#top)\n\n![AudioBook KJ hero](docs\u002Fassets\u002Freadme\u002Fhero-audiobook-kj.jpg)\n\nĐây là bản source public để tham khảo ý tưởng, học hỏi và thử nghiệm.\n\nRepo này cố tình không đưa lên các file media đã generate, database local, virtual environment, `node_modules`, voice reference riêng tư, ghi chú planning, manuscript và tài liệu tham khảo. Vì vậy app có thể cần chỉnh lại đôi chút trước khi chạy trên máy khác.\n\n## Chạy Một Click Trên Windows\n\nDành cho người không rành kỹ thuật:\n\n1. Download repo dạng ZIP hoặc clone repo.\n2. Giải nén ZIP.\n3. Double-click file:\n\n```text\nSTART_HERE.bat\n```\n\nLauncher này sẽ kiểm tra Git, Node.js, npm, Python và FFmpeg. Nếu thiếu phần nào, nó sẽ hỏi để cài bằng `winget`. Sau đó nó cài dependency frontend\u002Fbackend, tạo Python virtual environment, start backend, start frontend và mở browser.\n\nLưu ý:\n\n- Giữ hai cửa sổ terminal backend\u002Ffrontend mở khi dùng app.\n- Dependency AI\u002FTTS của backend có thể khá nặng và cài lâu.\n- Nếu `winget` cài xong nhưng launcher vẫn chưa nhận ra tool mới, hãy đóng terminal rồi chạy lại `START_HERE.bat`.\n- Gemini CLI và Chrome FlowKit extension vẫn là optional, hướng dẫn nằm bên dưới.\n\n## Đây Là App Gì?\n\nAudioBook KJ là một project thử nghiệm dạng AI audiobook\u002Fvideo studio. Mục tiêu là thử workflow biến nội dung dài thành script sạch hơn, chia đoạn, tạo audio narration, quản lý timeline\u002Fmedia, kết nối với asset hình\u002Fvideo được generate, rồi export thành một project audiobook\u002Fvideo.\n\nĐây không phải app production hoàn chỉnh. Repo này public chủ yếu để anh em tham khảo kiến trúc, lấy ý tưởng workflow, hoặc xem cách nối React frontend, Python backend, AI helper, audio processing và Chrome extension lại với nhau.\n\n## Các Workflow Chính Của App\n\nProject xoay quanh các workflow sau:\n\n1. **Import và dọn script**\n\n   Đưa text\u002Fscript vào app, clean markdown, chia nội dung dài thành chunk, và có thể gọi Gemini CLI để rewrite, enhance hoặc chuẩn hóa từng đoạn script.\n\n2. **AI direction và metadata**\n\n   Trích xuất entity, character reference, scene hint và metadata kiểu storyboard. Các helper này còn thử nghiệm và có thể cần Gemini CLI.\n\n3. **Tạo giọng đọc \u002F text-to-speech**\n\n   Chuyển từng dòng script thành audio clip bằng backend Python và tooling TTS\u002Fmodel local. Các file voice reference riêng tư không được đưa vào repo public.\n\n4. **Timeline audio và mixing**\n\n   Sắp xếp narration, music, sound effect; mix audio bằng Python\u002Fpydub; dùng FFmpeg khi cần export hoặc render media.\n\n5. **Workflow hình\u002Fvideo asset**\n\n   Quản lý asset hình\u002Fvideo được import hoặc generate, rồi gắn chúng với scene\u002Ftimeline clip. Media đã generate được ignore để repo nhẹ.\n\n6. **FlowKit browser bridge**\n\n   Chrome extension local có thể bridge workflow Google Flow trên browser với backend local. Phần này còn thử nghiệm, nên đọc kỹ code extension trước khi dùng.\n\n7. **Export**\n\n   Ghép audio\u002Fvideo asset thành output cuối. File export bị ignore khỏi Git để repo gọn và sạch.\n\nNói ngắn gọn: đây là playground để thử xây pipeline sản xuất audiobook\u002Fvideo bằng AI, không phải sản phẩm hoàn thiện chạy một phát là dùng ngay.\n\n## Phần Mềm Cần Cài Trước\n\nCài các phần này trước khi chạy app:\n\n- **Git**: để clone source.\n- **Node.js 20.19+ hoặc 22.12+**: frontend dùng Vite\u002FReact đời mới nên cần Node mới.\n- **npm**: đi kèm Node.js, dùng trong thư mục `frontend\u002F`.\n- **Python 3.10 hoặc 3.11**: khuyến nghị cho backend và các thư viện AI\u002Faudio.\n- **FFmpeg**: cần cho tính năng ghép audio\u002Fvideo và export.\n- **Google Chrome hoặc Chromium**: cần nếu muốn dùng extension FlowKit kèm theo repo.\n- **Gemini CLI**: không bắt buộc, nhưng cần nếu muốn dùng các flow helper gọi lệnh `gemini`.\n- **GPU NVIDIA + CUDA driver**: không bắt buộc, nhưng rất nên có nếu muốn chạy TTS\u002Fmodel local với Torch\u002FOmniVoice.\n\nVí dụ cài trên Windows:\n\n```powershell\nwinget install Git.Git\nwinget install OpenJS.NodeJS.LTS\nwinget install Python.Python.3.11\nwinget install Gyan.FFmpeg\nwinget install Google.Chrome\n```\n\nSau khi cài xong, mở terminal mới và kiểm tra:\n\n```powershell\ngit --version\nnode --version\nnpm --version\npython --version\nffmpeg -version\n```\n\n## Cài Gemini CLI\n\nMột số phần backend gọi trực tiếp lệnh `gemini`, ví dụ dọn script, enhance prompt, trích xuất entity, tạo storyboard. Chỉ cần cài Gemini CLI nếu muốn dùng những tính năng đó.\n\nCài bản chính thức:\n\n```powershell\nnpm install -g @google\u002Fgemini-cli\n```\n\nHoặc chạy thử không cần cài global:\n\n```powershell\nnpx https:\u002F\u002Fgithub.com\u002Fgoogle-gemini\u002Fgemini-cli\n```\n\nKiểm tra:\n\n```powershell\ngemini --version\n```\n\nChạy lần đầu để login\u002Fcấu hình:\n\n```powershell\ngemini\n```\n\nNếu terminal không tìm thấy lệnh `gemini`, hãy đóng mở lại terminal rồi kiểm tra:\n\n```powershell\nnpm config get prefix\nnpm bin -g\n```\n\nĐảm bảo thư mục binary global của npm đã nằm trong biến môi trường `PATH`.\n\nLưu ý:\n\n- Dùng đúng package chính thức: `@google\u002Fgemini-cli`.\n- Không cài các package tên gần giống nhưng không rõ nguồn.\n- Code trong repo có dùng lệnh kiểu `gemini --skip-trust`; hãy đọc kỹ prompt quyền truy cập\u002Ftrust của Gemini CLI trước khi cho phép nó sửa file.\n- Nếu không cài Gemini CLI thì vẫn có thể đọc\u002Fchạy thử frontend, nhưng các endpoint helper dùng Gemini có thể lỗi.\n\n## Cài Chrome Extension FlowKit\n\n![FlowKit extension workflow](docs\u002Fassets\u002Freadme\u002Fflowkit-extension-workflow.jpg)\n\nRepo có sẵn extension Chrome dạng unpacked tại:\n\n```text\naudiobook_builder\u002Fflowkit_extension\n```\n\nExtension này là local bridge cho workflow liên quan Google Flow. Nó cần backend local đang chạy và có thể tương tác với:\n\n- `https:\u002F\u002Flabs.google\u002Ffx\u002Ftools\u002Fflow`\n- `https:\u002F\u002Faisandbox-pa.googleapis.com`\n- WebSocket\u002FAPI route local của backend\n\nCách load extension vào Chrome:\n\n1. Mở Chrome.\n2. Vào `chrome:\u002F\u002Fextensions`.\n3. Bật **Developer mode**.\n4. Bấm **Load unpacked**.\n5. Chọn folder `audiobook_builder\u002Fflowkit_extension`.\n6. Pin extension **Flow Kit** nếu muốn mở nhanh.\n7. Chạy backend bằng `python server.py`.\n8. Mở `https:\u002F\u002Flabs.google\u002Ffx\u002Ftools\u002Fflow` nếu muốn dùng tính năng liên quan Flow.\n\nNếu Chrome không load được:\n\n- Kiểm tra trong `audiobook_builder\u002Fflowkit_extension` có file `manifest.json`.\n- Bấm reload extension trong `chrome:\u002F\u002Fextensions`.\n- Mở phần error của extension để xem thiếu file hoặc permission nào.\n- Đảm bảo backend đang chạy đúng port local mà extension mong đợi.\n\nQuan trọng:\n\n- Extension này chỉ dành cho thử nghiệm local.\n- Extension xin nhiều quyền vì nó bridge giữa browser, local backend và Google Flow.\n- Nên đọc `manifest.json`, `background.js`, `side_panel.js` trước khi dùng với tài khoản Google cá nhân.\n- Không commit token, cookie, media generate hoặc database local.\n\n## Tài Liệu Tham Khảo\n\nCác link này giúp người clone repo đọc thêm về những công nghệ đang được dùng.\n\nCông cụ nền:\n\n- [Git documentation](https:\u002F\u002Fgit-scm.com\u002Fdoc)\n- [Node.js downloads](https:\u002F\u002Fnodejs.org\u002Fen\u002Fdownload)\n- [npm documentation](https:\u002F\u002Fdocs.npmjs.com\u002F)\n- [Python documentation](https:\u002F\u002Fdocs.python.org\u002F3\u002F)\n- [FFmpeg documentation](https:\u002F\u002Fwww.ffmpeg.org\u002Fdocumentation.html)\n\nFrontend:\n\n- [React documentation](https:\u002F\u002Freact.dev\u002F)\n- [Vite documentation](https:\u002F\u002Fvite.dev\u002Fguide\u002F)\n- [Tailwind CSS documentation](https:\u002F\u002Ftailwindcss.com\u002Fdocs)\n- [TanStack Query documentation](https:\u002F\u002Ftanstack.com\u002Fquery\u002Flatest\u002Fdocs\u002Fframework\u002Freact\u002Foverview)\n- [React Flow documentation](https:\u002F\u002Freactflow.dev\u002F)\n- [Axios documentation](https:\u002F\u002Faxios-http.com\u002Fdocs\u002Fintro)\n- [Lucide React icons](https:\u002F\u002Flucide.dev\u002Fguide\u002Fpackages\u002Flucide-react)\n\nBackend và API:\n\n- [FastAPI documentation](https:\u002F\u002Ffastapi.tiangolo.com\u002F)\n- [Uvicorn documentation](https:\u002F\u002Fwww.uvicorn.org\u002F)\n- [Python multipart package](https:\u002F\u002Fgithub.com\u002FKludex\u002Fpython-multipart)\n\nAI và audio:\n\n- [PyTorch documentation](https:\u002F\u002Fdocs.pytorch.org\u002Fdocs\u002Fstable\u002Findex.html)\n- [PyTorch install selector](https:\u002F\u002Fpytorch.org\u002Fget-started\u002Flocally\u002F)\n- [Torchaudio documentation](https:\u002F\u002Fdocs.pytorch.org\u002Faudio\u002Fstable\u002Findex.html)\n- [Hugging Face Transformers documentation](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftransformers\u002Findex)\n- [Hugging Face Hub Python library](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fhuggingface_hub\u002Findex)\n- [python-soundfile documentation](https:\u002F\u002Fpython-soundfile.readthedocs.io\u002F)\n- [pydub GitHub repository](https:\u002F\u002Fgithub.com\u002Fjiaaro\u002Fpydub)\n- [OmniVoice GitHub repository](https:\u002F\u002Fgithub.com\u002Fk2-fsa\u002FOmniVoice)\n- [OmniVoice model on Hugging Face](https:\u002F\u002Fhuggingface.co\u002Fk2-fsa\u002FOmniVoice)\n\nGemini và Chrome extension:\n\n- [Gemini CLI GitHub repository](https:\u002F\u002Fgithub.com\u002Fgoogle-gemini\u002Fgemini-cli)\n- [Gemini CLI getting started docs](https:\u002F\u002Fgithub.com\u002Fgoogle-gemini\u002Fgemini-cli\u002Fblob\u002Fmain\u002Fdocs\u002Fget-started\u002Findex.md)\n- [Chrome Extensions documentation](https:\u002F\u002Fdeveloper.chrome.com\u002Fdocs\u002Fextensions)\n- [Chrome Extensions getting started](https:\u002F\u002Fdeveloper.chrome.com\u002Fdocs\u002Fextensions\u002Fmv3\u002Fgetstarted)\n- [Google Flow](https:\u002F\u002Flabs.google\u002Ffx\u002Ftools\u002Fflow)\n\n## Cảm Ơn\n\n- Cảm ơn [crisng95\u002Fflowkit](https:\u002F\u002Fgithub.com\u002Fcrisng95\u002Fflowkit) vì ý tưởng\u002Ftham khảo cho extension FlowKit.\n\n## Donate \u002F Ủng Hộ\n\nNếu repo này giúp anh em có ý tưởng, tiết kiệm thời gian, hoặc tự build được workflow AI media riêng thì có thể donate ủng hộ mình.\n\nDonate sẽ giúp mình có thêm thời gian dọn dẹp version 1, viết docs rõ hơn, sửa những chỗ còn thô, và update thêm nhiều tính năng mới. Nếu được ủng hộ nhiều, biết đâu mình public luôn version 2 polished hơn hehe.\n\n\u003Cimg src=\"docs\u002Fassets\u002Freadme\u002Fdonate-vietqr.jpg\" alt=\"Ủng hộ qua VietQR\" width=\"360\" \u002F>\n\nKhông donate cũng không sao nha. Star repo, góp ý, mở issue, hoặc khoe sản phẩm anh em build từ repo này cũng là một cách ủng hộ rất đáng quý rồi.\n\n## Prompt Tiếng Việt Cho AI Agent\n\nCopy prompt này đưa cho bất kỳ AI coding agent nào sau khi clone repo:\n\n```text\nBạn đang giúp tôi setup và chạy project này trên máy local.\n\nMục tiêu:\n- Đọc cấu trúc repo trước.\n- Kiểm tra các phần mềm hệ thống cần có trước khi cài dependency của project.\n- Xác định backend, frontend, package manager, runtime version và entry point.\n- Chỉ cài dependency cần thiết để chạy source code.\n- Chỉ tạo lại các folder\u002Ffile bị ignore hoặc generated khi thật sự cần.\n- Không khôi phục private assets, voice samples, audio\u002Fvideo generated, local databases, node_modules, virtual environments, planning files hoặc manuscript files.\n- Ưu tiên các bước setup an toàn trên local và giải thích command trước khi chạy.\n\nNgữ cảnh repo:\n- Đây là bản source-only public snapshot.\n- Một số asset và file generated đã được cố tình loại khỏi .gitignore.\n- Project không đảm bảo clone về là chạy ngay.\n- Nếu thiếu media\u002Foutput files thì xem đó là bình thường.\n- Dùng environment variable placeholder cho secret\u002FAPI key.\n- Frontend có thể cần Node.js 20.19+ hoặc 22.12+ vì dùng Vite stack mới.\n- Backend có thể cần Python 3.10\u002F3.11, FFmpeg, FastAPI\u002FUvicorn, Torch, Transformers, Hugging Face tooling, pydub, soundfile và OmniVoice.\n- Gemini CLI và Chrome\u002FChromium là optional, trừ khi tôi muốn dùng Gemini helper flow hoặc FlowKit extension.\n- Gemini CLI có thể cài bằng `npm install -g @google\u002Fgemini-cli`; kiểm tra bằng `gemini --version`.\n- Chrome extension có thể load unpacked từ `audiobook_builder\u002Fflowkit_extension` trong `chrome:\u002F\u002Fextensions`.\n- Trên Windows, nên thử `START_HERE.bat` trước để setup và chạy app một click.\n\nWorkflow đề xuất:\n1. Kiểm tra version của `git`, `node`, `npm`, `python`, `ffmpeg`.\n2. Trên Windows, đọc và cân nhắc dùng `START_HERE.bat` để setup một click.\n3. Nếu tôi muốn dùng tính năng Gemini, kiểm tra `gemini --version`; nếu không thì đánh dấu Gemini là optional.\n4. Nếu tôi muốn dùng tính năng FlowKit trên browser, hướng dẫn load Chrome extension từ `audiobook_builder\u002Fflowkit_extension`.\n5. Đọc README, package files, requirements files và các entry point rõ ràng.\n6. Kiểm tra folder frontend có package.json và cài dependency frontend.\n7. Kiểm tra folder audiobook_builder có requirements Python và tạo virtual environment local.\n8. Tìm cách dùng .env và tạo .env.example hoặc .env local chỉ với placeholder.\n9. Start backend và frontend riêng nếu phù hợp.\n10. Nếu startup fail vì thiếu asset\u002Fdatabase\u002Foutput bị ignore, tạo placeholder tối thiểu hoặc giải thích đang thiếu gì.\n11. Tóm tắt lại command setup cuối cùng và cách chạy app.\n\nRàng buộc:\n- Không commit secret.\n- Không download model\u002Fmedia file lớn nếu tôi chưa đồng ý.\n- Không add generated outputs vào Git.\n- Giữ thay đổi nhỏ, tập trung vào setup local.\n\nHãy bắt đầu bằng cách liệt kê cấu trúc project phát hiện được, sau đó đề xuất chính xác các command setup cho máy của tôi.\n```\n\n## Setup Local Dự Kiến\n\n![AudioBook KJ setup flow](docs\u002Fassets\u002Freadme\u002Fsetup-flow.jpg)\n\nProject có vẻ gồm:\n\n- `frontend\u002F`: frontend Vite\u002FReact.\n- `audiobook_builder\u002F`: backend Python và tool xử lý audiobook.\n\nCác command frontend thường dùng:\n\n```powershell\ncd frontend\nnpm install\nnpm run dev\n```\n\nCác command backend thường dùng:\n\n```powershell\ncd audiobook_builder\npython -m venv venv\n.\\venv\\Scripts\\Activate.ps1\npip install -r requirements.txt\npython server.py\n```\n\nCác command này chỉ là điểm bắt đầu. Hãy để AI Agent đọc repo và điều chỉnh theo máy đang chạy.\n","AudioBook KJ 是一个实验性的AI有声书\u002F视频工作室项目，旨在探索将长文本内容转换为结构化、有声读物或视频的工作流程。其核心功能包括脚本导入与清理、AI辅助的元数据提取、文本转语音生成、音频时间线编辑与混音以及视频\u002F视觉资产处理等，通过React前端、Python后端、AI助手和音频处理工具等技术实现。该项目适合对多媒体内容创作感兴趣的技术爱好者学习研究，或是希望了解如何集成多种技术栈以构建复杂应用的开发者参考使用。请注意，这并非一个成熟的生产应用，而是提供给用户作为架构学习和技术借鉴的公开源码快照。",2,"2026-06-11 04:04:07","CREATED_QUERY"]