{"_id":"@amai-io/amai-sdk","_rev":"1-43fbd8627dbccf3b3c4c3833058976de","name":"@amai-io/amai-sdk","dist-tags":{"latest":"0.0.0"},"versions":{"0.0.0":{"name":"@amai-io/amai-sdk","version":"0.0.0","description":"Amai Interaction Software Development Kit","keywords":["tts","text to speech","speech synthesis","voice","voice synthesis"],"main":"dist/amai-sdk.umd.js","module":"dist/amai-sdk.js","typings":"dist/types/amai-sdk.d.ts","author":{"name":"AI interaction corp.","email":"m@amai.io"},"repository":{"type":"git","url":"git+https://github.com/amai-io/amai-sdk.git"},"license":"MIT","engines":{"node":">=6.0.0"},"scripts":{"lint":"tslint  --project tsconfig.json -t codeFrame 'src/**/*.ts' 'test/**/*.ts'","prebuild":"rimraf dist","build":"tsc --module commonjs && rollup -c rollup.config.ts && typedoc --out docs --target es6 --theme minimal --mode file src","start":"rollup -c rollup.config.ts -w","test":"ava","test:prod":"npm run lint && npm run test -- --no-cache","deploy-docs":"ts-node tools/gh-pages-publish","report-coverage":"cat ./coverage/lcov.info | coveralls","commit":"git-cz","semantic-release":"semantic-release","semantic-release-prepare":"ts-node tools/semantic-release-prepare","precommit":"lint-staged"},"lint-staged":{"{src,test}/**/*.ts":["prettier --write","git add"]},"config":{"commitizen":{"path":"node_modules/cz-conventional-changelog"}},"prettier":{"semi":false,"singleQuote":true},"commitlint":{"extends":["@commitlint/config-conventional"]},"devDependencies":{"@babel/core":"^7.7.7","@babel/preset-env":"^7.7.7","@commitlint/cli":"^7.1.2","@commitlint/config-conventional":"^7.1.2","@types/node":"^10.11.0","ava":"^2.4.0","colors":"^1.3.2","commitizen":"^3.0.0","coveralls":"^3.0.2","cross-env":"^5.2.0","cz-conventional-changelog":"^2.1.0","husky":"^1.0.1","lint-staged":"^8.0.0","lodash.camelcase":"^4.3.0","prettier":"^1.14.3","prompt":"^1.0.0","replace-in-file":"^3.4.2","rimraf":"^2.6.2","rollup":"^0.67.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^9.1.8","rollup-plugin-json":"^3.1.0","rollup-plugin-node-resolve":"^3.4.0","rollup-plugin-sourcemaps":"^0.4.2","rollup-plugin-typescript2":"^0.18.0","semantic-release":"^15.9.16","shelljs":"^0.8.3","travis-deploy-once":"^5.0.9","ts-node":"^7.0.1","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-config-standard":"^8.0.1","typedoc":"^0.12.0","typescript":"^3.0.3"},"dependencies":{"axios":"^0.19.1","core-js":"^3.6.0","events":"^3.1.0"},"gitHead":"fa57614e7dd10fd65862365a262bb77c5100cc10","bugs":{"url":"https://github.com/amai-io/amai-sdk/issues"},"homepage":"https://github.com/amai-io/amai-sdk#readme","_id":"@amai-io/amai-sdk@0.0.0","_nodeVersion":"13.7.0","_npmVersion":"6.13.6","dist":{"integrity":"sha512-ZDeubNwinpcYM+N9aViYTIN1/wBVlH9XZP3tfKfGjZX1FyGEVbtmdGKoiYmV6rp5NyLygbBq161mSr+sIkUjXw==","shasum":"aad1c70dd497b75049113bce5d26b7d8f85fbd62","tarball":"https://registry.npmjs.org/@amai-io/amai-sdk/-/amai-sdk-0.0.0.tgz","fileCount":3,"unpackedSize":6838,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMZ6yCRA9TVsSAnZWagAAtccQAIpwQ+7Ff5JFHl23fD6W\npkkBrj8VNo98tuVUmGaPeRArVdNS7+SjbWakwg97rlcnIc8Zll5vJ9G8yWl/\ntYG2NeqXtHPPIJCX5Lz+Bsx2MFb0c2CU4VLqFL8ysTCv4rmjmucmnDREP52f\ncUy9LSa8WqAGfvWGuzCiGYvGNqFwMEfrb7qanQ0EAjqlx85w3ZfOkkcfe57k\npjnRhOK4ISiBUA5QW6Ofa0rjMrHeHeNC3tqm4rm8vD93hi1fqcsByp9yJ7yL\n+XsVO2o+VHseHO3BVPrkiK6rA1C9PAvfhCVCQapK1gc/Me7C2TD7E1fUtbHm\nZJRLVTHFZcNQ+c31yX7ncB6VSjhDn8GLvph3W5iToDQ0qe1GSmZwcNlHFoqJ\ndBb6jadiom9FFbwzbT829LsDRvgLeFQXE6Ywl/fLYMHdjaWDaElRShhppkrQ\nsCIjgxZX1g2pi9VtAjfW84Dfo0CofJZATlfCpz6FGEL8eiA2F0IZinKQInJb\nFLrNo3RVQ3R1qR/v2C4JM3R0NSgCPQa/JAyyhB88ysoxUMtwwBuxXl8U6WZ1\nWoiEeiFQtVkf1mO78WFM4hUvLXZ//BmjErMFwnuu35Iq9vj7lp32XVZ3kCiM\nysqg9UhwkuZuGWU8gNBi3BgWnxyV2lbrnI4n69jms9s+vaL0FU2PhtfbXleX\n6+L7\r\n=t9M6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDo1SvhPHoOaRFs5BnMJjRp54yhIIekjt2yGgBFf9X2AAIgK/tqbb7RWzHfInAOaTDC+iFgq1AGEMB2x3NB+Ds5hhI="}]},"maintainers":[{"name":"negash","email":"i@negash.ru"},{"name":"maxbaluev","email":"maxbaluev@outlook.com"}],"_npmUser":{"name":"negash","email":"i@negash.ru"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/amai-sdk_0.0.0_1580310194534_0.6784339072069436"},"_hasShrinkwrap":false}},"time":{"created":"2020-01-29T15:03:14.276Z","0.0.0":"2020-01-29T15:03:14.697Z","modified":"2022-04-04T13:42:39.405Z"},"maintainers":[{"name":"negash","email":"i@negash.ru"},{"name":"maxbaluev","email":"maxbaluev@outlook.com"}],"description":"Amai Interaction Software Development Kit","homepage":"https://github.com/amai-io/amai-sdk#readme","keywords":["tts","text to speech","speech synthesis","voice","voice synthesis"],"repository":{"type":"git","url":"git+https://github.com/amai-io/amai-sdk.git"},"author":{"name":"AI interaction corp.","email":"m@amai.io"},"bugs":{"url":"https://github.com/amai-io/amai-sdk/issues"},"license":"MIT","readme":"# WIP: Not for using at this moment.\n\n# Amai text to speech SDK\n\n## What can I do with that?\n\n- Easily teach your applications to speak with a human voice in different emotional colors\n- Give your users an unforgettable voice UX with adaptive audio player\n- Add TTS functionality to your web service in 5 lines of code\n\n## Installation\n\n```bash\nyarn add amai-sdk\n```\n\n## Browser environment\n\n```javascript\nimport sdk from 'amai-sdk'\n\n// Create stream\nconst stream = await sdk.synthesis.createStream('streamName')\n\n// Add stream to player\nconst player = sdk.player.create(stream)\n\n// Play live stream\nplayer.play()\n\n// Adding text for synthesis and adding the result to the stream,\n// as a result, the synthesized words \"I love amai!\",\n// will be played in the audio player in your browser!\nstream.addText('I love amai!')\n```\n\n## Authorization\n\nIn order to implement a more free limit, authorization is required. If you have exceeded the limit, you will receive an audio message substituting the synthesis result and detailed console.log with ways to solve the problem.\n\n`Free limit - 10 000 symbols.`\n\n```typescript\nimport sdk from 'amai-sdk'\n\nsdk.key = 'YourApiKey'\n// Now you can make authorized requests.\n```\n\nor you can authorize at any nested import\n\n```typescript\nimport { player } from 'amai-sdk'\n\nplayer.key = 'YourApiKey'\n// Now you can make authorized requests.\n```\n\n## Speech\n\n## Player\n\n## Utils\n\n## Stream example\n\n```typescript\nimport stream from 'amai-sdk/speech/stream'\n\nstream.api = 'YourApiKey'\n\nconst stream = await sdk.synthesis.createStream('streamName')\n// stream === { id: number: 1, name: 'streamName', url: 'https://amai-generate.s3.eu-central-1.amazonaws.com/c0fc0b05c29c2904.mp3' }\n\n// Return stream json metadata or error\nconst stream: Stream = await stream.getOrCreate('name')\n\nstream.addText('I love amai.')\n```\n\nThe SDK can be built into the client and server code, permission and access control is based on metadata included in the jwt key. SDK is a wrapper over HTTP calls to the REST backend, that makes it easy to work with your own logic.\n\n- Speech\n\n  - Synthesis\n  - Recognition(Planned)\n\n- Text\n  - Translation(Planned)\n- OCR\n  - Page(Planned)\n  - Document(Planned)\n- Player(WIP)\n- Utils\n\n## Advanced example\n\n### NPM scripts\n\n- `npm t`: Run test suite\n- `npm start`: Run `npm run build` in watch mode\n- `npm run test:watch`: Run test suite in [interactive watch mode](http://facebook.github.io/jest/docs/cli.html#watch)\n- `npm run test:prod`: Run linting and generate coverage\n- `npm run build`: Generate bundles and typings, create docs\n- `npm run lint`: Lints code\n- `npm run commit`: Commit using conventional commit style ([husky](https://github.com/typicode/husky) will tell you to use it if you haven't :wink:)\n\n### Todo test cases\n\n- Can add text only to self streams\n\n### Long term todo\n\n- Change demo app to player example\n- Move to github standalone repo\n- Migrate from travis CI to gitlab CI\n","readmeFilename":"README.md"}