タイトルの通りvoicevoxとnode.jsを使って音声読み上げをさせます。 コード 最初に結論のコードを載せます。どーん import fetch from "node-fetch"; import fs from "fs" const text = "おはようございます" const res = await fetch(`http://localhost:50021/audio_query?text=${text}&speaker=0`, { method: "POST", headers: { 'Content-Type': 'application/json' } }) const query = await res.json() const sound_row = await fetch(`http://localhost:50021/synthesis?speaker=0&e
![Linux × Node.js × voicevoxで音声読み上げ](https://cdn-ak-scissors.b.st-hatena.com/image/square/7ee5fdae81951be1b4a60867dda95fa4e0de4810/height=288;version=1;width=512/https%3A%2F%2Fres.cloudinary.com%2Fzenn%2Fimage%2Fupload%2Fs--uhdvoV72--%2Fc_fit%252Cg_north_west%252Cl_text%3Anotosansjp-medium.otf_55%3ALinux%252520%2525C3%252597%252520Node.js%252520%2525C3%252597%252520voicevox%2525E3%252581%2525A7%2525E9%25259F%2525B3%2525E5%2525A3%2525B0%2525E8%2525AA%2525AD%2525E3%252581%2525BF%2525E4%2525B8%25258A%2525E3%252581%252592%252Cw_1010%252Cx_90%252Cy_100%2Fg_south_west%252Cl_text%3Anotosansjp-medium.otf_37%3A%2525E3%252581%2525B2%2525E3%252581%252595%2525E3%252582%252581%252Cx_203%252Cy_121%2Fg_south_west%252Ch_90%252Cl_fetch%3AaHR0cHM6Ly9saDMuZ29vZ2xldXNlcmNvbnRlbnQuY29tL2EtL0FPaDE0R2otM0lVTFNOa1FtMnpicW1TNWFlUU1jeWtXSkphbG1LdENfaWY4PXM5Ni1j%252Cr_max%252Cw_90%252Cx_87%252Cy_95%2Fv1627283836%2Fdefault%2Fog-base-w1200-v2.png)