{"_id":"gspeak","_rev":"7-8321870362e63a43f047d27066f29cde","name":"gspeak","dist-tags":{"latest":"0.0.4"},"versions":{"0.0.3":{"name":"gspeak","version":"0.0.3","keywords":["google","tts","text-to-speech","gtts","gspeak","speech","audio","mp3","typescript"],"author":{"name":"Qasim Ali"},"license":"MIT","_id":"gspeak@0.0.3","maintainers":[{"name":"qasim-api","email":"raikasim1@gmail.com"}],"homepage":"https://github.com/GlobalTechInfo/gspeak#readme","bugs":{"url":"https://github.com/GlobalTechInfo/gspeak/issues"},"bin":{"gspeak":"dist/bin/gspeak.js"},"dist":{"shasum":"6b324e4b35436c3915778f9e8e84d179ff278e14","tarball":"https://registry.npmjs.org/gspeak/-/gspeak-0.0.3.tgz","fileCount":13,"integrity":"sha512-zyB0ATGtgecoy55/MQk1iqWYZ8KQdXdwg5PysAAvPlFk+2qEV9ryODgOgoaAqpSF3x6xWIXUywxPKy9qHV8B9w==","signatures":[{"sig":"MEYCIQD/iKSwabFavg4LdZ2ik8fIuoOqJZzeQFi6/243WicXwwIhAKPkNvaee+JNTM0tA9lpnR6yuYJJqe4HNfHCEBRvh7GO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/gspeak@0.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16425},"main":"dist/src/index.js","types":"dist/src/index.d.ts","gitHead":"a3e9bc4838d503919f94085ecb8890358ab56584","scripts":{"lint":"eslint src/**/*.ts bin/**/*.ts","test":"mocha --timeout 30000 -r ts-node/register \"tests/**/*.test.ts\"","build":"tsc -p .","prebuild":"rimraf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"qasim-api","email":"raikasim1@gmail.com"},"repository":{"url":"git+https://github.com/GlobalTechInfo/gspeak.git","type":"git"},"_npmVersion":"11.11.0","description":"Google Text to Speech — a modern TypeScript rewrite of gtts with zero deprecated dependencies","directories":{},"_nodeVersion":"20.20.0","dependencies":{"yargs":"^18.0.0"},"publishConfig":{"provenance":true},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^11.0.0","eslint":"^9.0.0","rimraf":"^6.0.0","ts-node":"^10.9.2","typescript":"^5.0.0","@types/node":"^22.0.0","@types/mocha":"^10.0.0","@types/yargs":"^17.0.0","typescript-eslint":"^8.0.0","@typescript-eslint/parser":"^8.0.0","@typescript-eslint/eslint-plugin":"^8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/gspeak_0.0.3_1772373728795_0.002173110204670481","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"gspeak","version":"0.0.4","description":"Google Text to Speech — a modern TypeScript rewrite of gtts with zero deprecated dependencies","main":"dist/src/index.js","types":"dist/src/index.d.ts","bin":{"gspeak":"dist/bin/gspeak.js"},"scripts":{"prebuild":"rimraf dist","build":"tsc -p .","prepublishOnly":"npm run build","lint":"eslint src/**/*.ts bin/**/*.ts","test":"vitest run","test:coverage":"vitest run --coverage","verify":"npm run build && npx ts-node verify-languages.ts"},"keywords":["google","tts","text-to-speech","gtts","gspeak","speech","audio","mp3","typescript"],"author":{"name":"Qasim Ali"},"license":"MIT","dependencies":{"yargs":"^18.0.0"},"devDependencies":{"@types/node":"^22.0.0","@types/yargs":"^17.0.0","@typescript-eslint/eslint-plugin":"^8.0.0","@typescript-eslint/parser":"^8.0.0","@vitest/coverage-v8":"^4.1.0","eslint":"^9.0.0","rimraf":"^6.0.0","typescript":"^5.0.0","typescript-eslint":"^8.0.0","vitest":"^4.1.0"},"publishConfig":{"provenance":true},"repository":{"type":"git","url":"git+https://github.com/GlobalTechInfo/gspeak.git"},"bugs":{"url":"https://github.com/GlobalTechInfo/gspeak/issues"},"homepage":"https://github.com/GlobalTechInfo/gspeak#readme","vitest":{"coverage":{"provider":"v8","include":["src/**/*.ts"],"exclude":["src/index.ts"],"reporter":["text","html"],"thresholds":{"lines":100,"functions":100,"branches":100,"statements":100}}},"gitHead":"adbf10631eac3bb2f478c26bd811f136c5e4892d","_id":"gspeak@0.0.4","_nodeVersion":"20.20.1","_npmVersion":"11.11.1","dist":{"integrity":"sha512-/Q9UdgFbUsizLpBuc6f7y0bY4nJsCzTxrpb25xBGSKWjxJ+jt7GdRi2sEG/G2lbXKCEJHcoIKiPLmvfNJG/ctQ==","shasum":"3ea91fb06ba6a2c977e02f741a3772c2e5886d6a","tarball":"https://registry.npmjs.org/gspeak/-/gspeak-0.0.4.tgz","fileCount":13,"unpackedSize":18653,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/gspeak@0.0.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDl+qnTrHjRZDO0/Q5hweDPgCfJKfJ47TtcS/NTCLhZRAiEAs93qqAj775BiGl/ZGnQMOIvJMQrXWHVXpeuGh/tufm8="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:b2d7cb31-5724-41e7-a1ca-45363afff400"}},"directories":{},"maintainers":[{"name":"qasim-api","email":"raikasim1@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gspeak_0.0.4_1773749848874_0.9140317826047804"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-01T13:30:25.427Z","modified":"2026-03-17T12:17:29.261Z","0.0.1":"2026-02-27T18:40:48.893Z","0.0.2":"2026-03-01T13:30:25.738Z","0.0.3":"2026-03-01T14:02:08.958Z","0.0.4":"2026-03-17T12:17:29.010Z"},"bugs":{"url":"https://github.com/GlobalTechInfo/gspeak/issues"},"author":{"name":"Qasim Ali"},"license":"MIT","homepage":"https://github.com/GlobalTechInfo/gspeak#readme","keywords":["google","tts","text-to-speech","gtts","gspeak","speech","audio","mp3","typescript"],"repository":{"type":"git","url":"git+https://github.com/GlobalTechInfo/gspeak.git"},"description":"Google Text to Speech — a modern TypeScript rewrite of gtts with zero deprecated dependencies","maintainers":[{"name":"qasim-api","email":"raikasim1@gmail.com"}],"readme":"<div align=\"center\">\n\n<img src=\"https://img.icons8.com/color/96/google-logo.png\" alt=\"gspeak\" width=\"96\"/>\n\n# gspeak\n\n**Google Text to Speech for Node.js**\n\nA TypeScript rewrite of [gtts](https://www.npmjs.com/package/gtts) — drop-in compatible.\n\n[![License](https://img.shields.io/npm/l/gspeak?style=flat-square&label=License&color=blue)](https://github.com/GlobalTechInfo/gspeak/blob/main/LICENSE)\n[![Coverage](https://codecov.io/gh/GlobalTechInfo/gspeak/branch/main/graph/badge.svg)](https://codecov.io/gh/GlobalTechInfo/gspeak)\n[![NPM Version](https://img.shields.io/npm/v/gspeak?style=flat-square&label=Version&color=red)](https://npmjs.com/package/gspeak)\n[![Code Quality](https://img.shields.io/codefactor/grade/github/GlobalTechInfo/gspeak?style=flat-square&label=Code%20Quality)](https://www.codefactor.io/repository/github/GlobalTechInfo/gspeak)\n[![Downloads](https://img.shields.io/npm/dw/gspeak?style=flat-square&label=Downloads&color=green)](https://npmjs.com/package/gspeak)\n\n</div>\n\n---\n\n## ✨ Features\n\n- 🔊 Convert any text to speech using **Google TTS**\n- 🔷 Full **TypeScript** support\n- 🔗 **Drop-in replacement** for `gtts`\n- 🌍 **81 languages** supported\n- 💾 Save to file or stream directly\n- 🖥️ **CLI** included\n\n---\n\n## 📦 Installation\n\n```bash\nnpm i gspeak\n```\n\n---\n\n## 🚀 Quick Start\n\n```ts\nimport { gSpeak } from 'gspeak'\n\nconst tts = new gSpeak('Hello world', 'en')\ntts.save('/tmp/hello.mp3', (err) => {\n  if (err) throw err\n  console.log('Saved to /tmp/hello.mp3')\n})\n```\n\n---\n\n## 📥 Import\n\n```ts\nimport { gSpeak } from 'gspeak'         // ESM ✅\n\nconst { gSpeak } = require('gspeak')     // CJS ✅\n\nconst gSpeak = require('gspeak').default   // CJS ✅\n```\n\n---\n\n## 📖 Usage\n\n### Save to file\n\n```ts\nimport { gSpeak } from 'gspeak'\n\nconst tts = new gSpeak('Text to speak', 'en')\ntts.save('/tmp/output.mp3', (err) => {\n  if (err) throw err\n  console.log('Done!')\n})\n```\n\n### Stream (e.g. with Express)\n\n```ts\nimport express from 'express'\nimport { gSpeak } from 'gspeak'\n\nconst app = express()\n\napp.get('/speak', (req, res) => {\n  const tts = new gSpeak(req.query.text as string, req.query.lang as string)\n  tts.stream().pipe(res)\n})\n\napp.listen(3000, () => {\n  console.log('http://localhost:3000/speak?lang=en&text=Hello')\n})\n```\n\n### List all supported languages\n\n```ts\nimport { LANGUAGES } from 'gspeak'\n\nconsole.log(LANGUAGES)\n// { af: 'Afrikaans', sq: 'Albanian', ... }\n\n// or via the static getter\nimport { gSpeak } from 'gspeak'\nconsole.log(gSpeak.languages)\n```\n\n### Debug mode\n\n```ts\nconst tts = new gSpeak('Hello', 'en', true) // 3rd param enables debug logging\n```\n\n---\n\n## 🖥️ CLI\n\n```bash\nnpm install -g gspeak\ngspeak \"Hello Google Text to Speech\" -l en -o /tmp/hello.mp3\n```\n\n| Flag | Alias | Description |\n|------|-------|-------------|\n| `--language` | `-l` | Language code (default: `en`) |\n| `--output` | `-o` | Output file path (required) |\n| `--verbose` | `-v` | Print debug messages |\n\n---\n\n## 🌍 Supported Languages (81 total)\n\n| Code | Language |\n|------|----------|\n| `af` | Afrikaans |\n| `sq` | Albanian |\n| `am` | Amharic |\n| `ar` | Arabic |\n| `eu` | Basque |\n| `bn` | Bengali |\n| `bs` | Bosnian |\n| `bg` | Bulgarian |\n| `my` | Burmese |\n| `ca` | Catalan |\n| `zh` | Chinese |\n| `zh-cn` | Chinese (Simplified) |\n| `zh-tw` | Chinese (Traditional) |\n| `zh-yue` | Chinese (Cantonese) |\n| `hr` | Croatian |\n| `cs` | Czech |\n| `da` | Danish |\n| `nl` | Dutch |\n| `en` | English |\n| `en-au` | English (Australia) |\n| `en-ca` | English (Canada) |\n| `en-in` | English (India) |\n| `en-ie` | English (Ireland) |\n| `en-uk` | English (United Kingdom) |\n| `en-us` | English (United States) |\n| `en-za` | English (South Africa) |\n| `et` | Estonian |\n| `fil` | Filipino |\n| `fi` | Finnish |\n| `fr` | French |\n| `fr-ca` | French (Canada) |\n| `fr-fr` | French (France) |\n| `gl` | Galician |\n| `de` | German |\n| `el` | Greek |\n| `gu` | Gujarati |\n| `ha` | Hausa |\n| `iw` | Hebrew |\n| `hi` | Hindi |\n| `hu` | Hungarian |\n| `is` | Icelandic |\n| `id` | Indonesian |\n| `it` | Italian |\n| `ja` | Japanese |\n| `jw` | Javanese |\n| `kn` | Kannada |\n| `km` | Khmer |\n| `ko` | Korean |\n| `la` | Latin |\n| `lv` | Latvian |\n| `lt` | Lithuanian |\n| `ms` | Malay |\n| `ml` | Malayalam |\n| `mr` | Marathi |\n| `ne` | Nepali |\n| `no` | Norwegian |\n| `pl` | Polish |\n| `pt` | Portuguese |\n| `pt-br` | Portuguese (Brazil) |\n| `pt-pt` | Portuguese (Portugal) |\n| `pa` | Punjabi |\n| `ro` | Romanian |\n| `ru` | Russian |\n| `sr` | Serbian |\n| `si` | Sinhala |\n| `sk` | Slovak |\n| `es` | Spanish |\n| `es-es` | Spanish (Spain) |\n| `es-us` | Spanish (United States) |\n| `su` | Sundanese |\n| `sw` | Swahili |\n| `sv` | Swedish |\n| `tl` | Tagalog |\n| `ta` | Tamil |\n| `te` | Telugu |\n| `th` | Thai |\n| `tr` | Turkish |\n| `uk` | Ukrainian |\n| `ur` | Urdu |\n| `vi` | Vietnamese |\n| `cy` | Welsh |\n---\n\n## 🔄 Migrating from `gtts`\n\n`gspeak` is a drop-in replacement. Just change the import:\n\n```ts\n// before\nconst gTTS = require('gtts')\nconst tts = new gTTS('Hello', 'en')\n\n// after\nconst { gSpeak } = require('gspeak')\nconst tts = new gSpeak('Hello', 'en')\n```\n\nSame constructor, same `.save()`, same `.stream()` — nothing else changes.\n\n---\n\n## 📄 License\n\nMIT © [Qasim Ali](https://github.com/GlobalTechInfo)\n\n---\n\n<div align=\"center\">\n\nMade with ❤️ — Thanks for using **gspeak**!\n\n</div>\n","readmeFilename":"README.md"}