{"id":48756305,"url":"https://github.com/voiceittech/voiceit3-web-sdk","last_synced_at":"2026-06-18T17:31:50.685Z","repository":{"id":40294637,"uuid":"140885093","full_name":"voiceittech/voiceit3-web-sdk","owner":"voiceittech","description":"Example frontend and backend using VoiceIt's API 3.0","archived":false,"fork":false,"pushed_at":"2026-06-05T08:58:35.000Z","size":185948,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-06-06T00:20:32.990Z","etag":null,"topics":["api-wrapper","backend","biometrics","face","face-recognition","frontend","sdk","voice","voice-recognition","voiceit","web"],"latest_commit_sha":null,"homepage":"https://voiceit.io","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voiceittech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-07-13T19:22:04.000Z","updated_at":"2026-06-05T08:58:38.000Z","dependencies_parsed_at":"2025-02-23T22:36:33.666Z","dependency_job_id":null,"html_url":"https://github.com/voiceittech/voiceit3-web-sdk","commit_stats":null,"previous_names":["voiceittech/voiceit3-websdk","voiceittech/voiceit3-web-sdk"],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/voiceittech/voiceit3-web-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voiceittech%2Fvoiceit3-web-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voiceittech%2Fvoiceit3-web-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voiceittech%2Fvoiceit3-web-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voiceittech%2Fvoiceit3-web-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voiceittech","download_url":"https://codeload.github.com/voiceittech/voiceit3-web-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voiceittech%2Fvoiceit3-web-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34501472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-wrapper","backend","biometrics","face","face-recognition","frontend","sdk","voice","voice-recognition","voiceit","web"],"created_at":"2026-04-13T02:51:50.814Z","updated_at":"2026-06-18T17:31:50.653Z","avatar_url":"https://github.com/voiceittech.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://raw.githubusercontent.com/voiceittech/voiceit3-web-sdk/main/js.png\" width=\"100%\" style=\"width:100%\" /\u003e\n\n# VoiceIt API 3.0 Web SDK\n\n[![Build](https://github.com/voiceittech/voiceit3-web-sdk/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/voiceittech/voiceit3-web-sdk/actions/workflows/test.yml)\n[![Dependabot](https://img.shields.io/github/issues-pr/voiceittech/voiceit3-web-sdk/dependencies?label=dependabot\u0026logo=dependabot\u0026color=025e8c)](https://github.com/voiceittech/voiceit3-web-sdk/pulls?q=is%3Apr+label%3Adependencies)\n[![Version](https://img.shields.io/badge/version-3.0.5-blue)](https://github.com/voiceittech/voiceit3-web-sdk)\n[![License: MIT](https://img.shields.io/badge/license-MIT-green)](https://github.com/voiceittech/voiceit3-web-sdk/blob/main/LICENSE)\n[![Platform](https://img.shields.io/badge/platform-web-lightgrey)](https://voiceit.io/demo)\n[![VoiceIt API](https://img.shields.io/badge/VoiceIt-API%203.0-blue)](https://voiceit.io)\n\nThis repository contains an example [web demonstration](#web-example) of VoiceIt's API 3.0 in the browser with a PHP, NodeJS, or Go backend. See [Incorporating the SDK](#incorporating-the-sdk) for instructions on integrating the SDK into your own project.\n\n* [Backend Options](#backend-options)\n* [Supported Browsers](#supported-browsers)\n* [UI Screenshots](#ui-screenshots)\n* [Web Example](#web-example)\n  * [Getting Started](#getting-started)\n    * [The Config File](#the-config-file)\n    * [Making Changes to the Frontend](#making-changes-to-the-frontend)\n    * [Running the Example](#running-the-example)\n* [Incorporating the SDK](#incorporating-the-sdk)\n  * [Backend Implementation](#backend-implementation)\n    * [Initializing the Base Module](#initializing-the-base-module)\n    * [Getting the Result](#getting-the-result)\n    * [Generating a Secure Token](#generating-a-secure-token)\n  * [Frontend Implementation](#frontend-implementation)\n    * [Initializing the Frontend](#initializing-the-frontend)\n    * [Setting Theme Color](#setting-theme-color)\n    * [Setting the Secure Token](#setting-the-secure-token)\n    * [Enrollment and Verification Methods](#enrollment-and-verification-methods)\n  * [Implementation Diagram](#implementation-diagram)\n  * [Changing the Content Language](#changing-the-content-language)\n* [Getting Help](#getting-help)\n\n## Backend Options\nChoose one of the following for the server-side implementation:\n* **PHP:** PHP 8.0+ with a compatible server such as Apache\n* **Node:** Node 18+\n* **Go:** Go 1.17+\n\n## Audio Recording Requirements\n\nThe SDK records audio at the following specifications for optimal biometric accuracy:\n\n| Setting | Value |\n|---------|-------|\n| Sample Rate | 48 kHz |\n| Bit Depth | 16-bit |\n| Channels | Mono |\n| Format | WebM/Opus or WAV |\n\n\u003e **Note:** Recordings below 16 kHz sample rate will significantly degrade biometric accuracy and may result in failed enrollments or verifications. The SDK explicitly requests 48 kHz mono from the browser. Browsers that only support 44.1 kHz will fall back gracefully.\n\n## Supported Browsers\n\n**Desktop:**\n\n| Browser | Minimum Version | Windows | macOS | Linux |\n|---------|----------------|---------|-------|-------|\n| Google Chrome | 55+ | 7+ | 10.12+ | 64-bit |\n| Firefox | 52+ | 7+ | 10.12+ | 64-bit |\n| Safari | 14.1+ | — | 10.15+ | — |\n| Microsoft Edge | 79+ | 10+ | 10.12+ | 64-bit |\n| Opera | 42+ | 7+ | 10.12+ | 64-bit |\n\n**Mobile:**\n\n| Browser | Minimum Version | Android | iOS |\n|---------|----------------|---------|-----|\n| Google Chrome | 55+ | 6.0+ | 14.0+ |\n| Safari | 14.5+ | — | 14.5+ |\n| Firefox | 52+ | 6.0+ | 14.0+ |\n\n\u003e **Note:** Internet Explorer is not supported. The SDK requires modern browser APIs including MediaRecorder, async/await, and getUserMedia.\n\n## UI Screenshots\n\n\u003cimg width=\"32%\" src=\"https://raw.githubusercontent.com/voiceittech/voiceit3-web-sdk/main/voiceit3-graphics/voiceVerification.png?v=2\" style=\"display: inline-block\"/\u003e\u003cimg width=\"32%\" src=\"https://raw.githubusercontent.com/voiceittech/voiceit3-web-sdk/main/voiceit3-graphics/faceVerification.png?v=2\" style=\"display: inline-block; margin: 0 2%\"/\u003e\u003cimg width=\"32%\" src=\"https://raw.githubusercontent.com/voiceittech/voiceit3-web-sdk/main/voiceit3-graphics/videoVerification.png?v=2\" style=\"display: inline-block\"/\u003e\n\n## Web Example\n\n### Getting Started\n\nSign up at [voiceit.io/pricing](https://voiceit.io/pricing) to get your API Key and Token, then log in to the [Dashboard](https://dashboard.voiceit.io) to manage your account.\n\n\u003cimg src=\"https://raw.githubusercontent.com/voiceittech/voiceit3-web-sdk/main/voiceit3-graphics/getcredentials.png\" alt=\"API Key and Token\" width=\"400px\" /\u003e\n\n#### The Config File\n\n##### PHP\nNavigate to `voiceit3-php-server-example/config.php`. Replace `API_KEY_HERE` with your API Key, `API_TOKEN_HERE` with your API Token, and `TEST_USER_ID_HERE` with a userId.\n\n##### NodeJS\nNavigate to `voiceit3-node-server-example/config.js`. Replace `API_KEY_HERE` with your API Key, `API_TOKEN_HERE` with your API Token, and `TEST_USER_ID_HERE` with a userId.\n\n##### Go\nNavigate to `voiceit3-go-server-example/config.go`. Replace `[API_KEY_HERE]` with your API Key, `[API_TOKEN_HERE]` with your API Token, and `[TEST_USER_ID_HERE]` with a userId.\n\n#### Making Changes to the Frontend\nThe frontend source files are in the `voiceit3-frontend/` folder, compiled using webpack into the `voiceit3-dist/` folder. Run the compile script from the `voiceit3-frontend/` directory to rebuild and copy `voiceit3.min.js` to all example server directories:\n\n```bash\ncd voiceit3-frontend \u0026\u0026 ./compile.sh\n```\n\n#### Running the Example\n\n##### PHP\nStart your server (Apache), pointing to `voiceit3-php-server-example` as the document root.\n\n##### NodeJS\n\nPackages are hosted on [GitHub Packages](https://github.com/orgs/voiceittech/packages). Add the registry to your `.npmrc`:\n```\n@voiceittech:registry=https://npm.pkg.github.com\n```\n\nThen install:\n```bash\ncd voiceit3-node-websdk \u0026\u0026 npm install\ncd ../voiceit3-node-server-example \u0026\u0026 npm install\nnpm start\n```\n\n##### Go\n```bash\ncd voiceit3-go-server-example \u0026\u0026 go run .\n```\n\nVisit your server at port 3000. Set `DEMO_EMAIL` and `DEMO_PASSWORD` in the example server's `.env` (see `.env.example`) — those are the credentials the example `/login` endpoint will accept. First complete enrollment(s), then test verification. You will need to grant microphone and camera permissions.\n\n## Incorporating the SDK\n\n\u003cimg src=\"https://raw.githubusercontent.com/voiceittech/voiceit3-web-sdk/main/voiceit3-graphics/diagram.png\" width=\"70%\" style=\"width:70%\" /\u003e\n\nEach type (voice, face, and video) and each action (enrollment and verification) can be implemented independently. A backend and frontend implementation is required.\n\n### Backend Implementation\n\n#### Initializing the Base Module\n\n##### PHP\n```php\nrequire('voiceit3-php-websdk/voiceit3webbackend.php');\n$myVoiceIt = new VoiceIt3WebBackend(\"YOUR_API_KEY\", \"YOUR_API_TOKEN\");\n\n$voiceItResultCallback = function($jsonObj){\n  $callType = $jsonObj[\"callType\"];\n  $userId = $jsonObj[\"userId\"];\n  if($jsonObj[\"jsonResponse\"][\"responseCode\"] == \"SUCC\"){\n    // User verified - start session\n  }\n};\n\n$myVoiceIt-\u003eInitBackend($_POST, $_FILES, $voiceItResultCallback);\n```\n\n##### NodeJS\n```javascript\nconst VoiceIt3WebSDK = require('voiceit3-node-websdk');\nconst multer = require('multer')();\n\napp.post('/example_endpoint', multer.any(), function (req, res) {\n  const myVoiceIt = new VoiceIt3WebSDK.Voiceit3(\"YOUR_API_KEY\", \"YOUR_API_TOKEN\", {\n    tempFilePath: \"/tmp/\"\n  });\n  myVoiceIt.makeCall(req, res, function(jsonObj){\n    const callType = jsonObj.callType.toLowerCase();\n    const userId = jsonObj.userId;\n    if(jsonObj.jsonResponse.responseCode === \"SUCC\"){\n      // User verified - start session\n    }\n  });\n});\n```\n\n##### Go\n```go\nimport websdk \"github.com/voiceittech/voiceit3-web-sdk/voiceit3-go-websdk\"\n\nvar backend websdk.WebSDK\n\nfunc init() {\n  backend.Initialize(\"YOUR_API_KEY\", \"YOUR_API_TOKEN\", 1)\n}\n\nrouter.Post(\"/example_endpoint\", func(w http.ResponseWriter, r *http.Request) {\n  ret, err := backend.MakeCall(r)\n  if err != nil {\n    // Handle error\n    return\n  }\n  bytes, _ := json.Marshal(ret)\n  w.Write(bytes)\n})\n```\n\n#### Getting the Result\nAfter verification, the callback receives:\n\n```json\n{\n  \"callType\": \"faceVerification\",\n  \"userId\": \"usr_********************\",\n  \"jsonResponse\": {\n    \"faceConfidence\": 100,\n    \"message\": \"Successfully verified face for user\",\n    \"timeTaken\": \"2.249s\",\n    \"responseCode\": \"SUCC\",\n    \"status\": 200\n  }\n}\n```\n\n#### Generating a Secure Token\n\n##### PHP\n```php\nrequire('voiceit3-php-websdk/voiceit3webbackend.php');\n$myVoiceIt = new VoiceIt3WebBackend(\"YOUR_API_KEY\", \"YOUR_API_TOKEN\");\n$createdToken = $myVoiceIt-\u003egenerateTokenForUser($VOICEIT_USERID);\n\necho json_encode([\n  \"ResponseCode\" =\u003e \"SUCC\",\n  \"Token\" =\u003e $createdToken\n]);\n```\n\n##### NodeJS\n```javascript\nconst VoiceIt3WebSDK = require('voiceit3-node-websdk');\n\napp.get('/login', function (req, res) {\n  const createdToken = VoiceIt3WebSDK.generateTokenForUser({\n    userId: VOICEIT_USERID,\n    token: \"YOUR_API_TOKEN\",\n    sessionExpirationTimeHours: 1\n  });\n\n  res.json({\n    'ResponseCode': 'SUCC',\n    'Token': createdToken\n  });\n});\n```\n\n##### Go\n```go\ntok, err := backend.GenerateTokenForUser(VOICEIT_USERID)\nif err != nil {\n  // Handle error\n  return\n}\n\nret := map[string]string{\n  \"ResponseCode\": \"SUCC\",\n  \"Token\": tok,\n}\nbytes, _ := json.Marshal(ret)\nw.Write(bytes)\n```\n\n### Frontend Implementation\n\n#### Initializing the Frontend\n\nInclude the minified JavaScript file:\n```html\n\u003cscript src='/voiceit3.min.js'\u003e\u003c/script\u003e\n```\n\nInitialize:\n```javascript\nvar myVoiceIt = new VoiceIt3.initialize('/example_endpoint/', 'en-US');\n```\n\n#### Setting Theme Color\n```javascript\nmyVoiceIt.setThemeColor('#FBC132');\n```\n\n#### Setting the Secure Token\n```javascript\nmyVoiceIt.setSecureToken('TOKEN_FROM_BACKEND');\n```\n\n#### Enrollment and Verification Methods\n\n##### Voice Enrollment\n```javascript\nmyVoiceIt.encapsulatedVoiceEnrollment({\n  contentLanguage: 'en-US',\n  phrase: 'Never forget tomorrow is a new day',\n  completionCallback: function(success, jsonResponse) {\n    if (success) {\n      alert('Voice Enrollments Done!');\n    }\n  }\n});\n```\n\n##### Face Enrollment\n```javascript\nmyVoiceIt.encapsulatedFaceEnrollment({\n  completionCallback: function(success, jsonResponse) {\n    if (success) {\n      alert('Face Enrollment Done!');\n    }\n  }\n});\n```\n\n##### Video Enrollment\n```javascript\nmyVoiceIt.encapsulatedVideoEnrollment({\n  contentLanguage: 'en-US',\n  phrase: 'Never forget tomorrow is a new day',\n  completionCallback: function(success, jsonResponse) {\n    if (success) {\n      alert('Video Enrollments Done!');\n    }\n  }\n});\n```\n\n##### Voice Verification\n```javascript\nmyVoiceIt.encapsulatedVoiceVerification({\n  contentLanguage: 'en-US',\n  phrase: 'Never forget tomorrow is a new day',\n  needEnrollmentsCallback: function() {\n    alert('A minimum of three enrollments are needed');\n  },\n  completionCallback: function(success, jsonResponse) {\n    if (success) {\n      alert('Successfully verified voice');\n    }\n  }\n});\n```\n\n##### Face Verification\n```javascript\nmyVoiceIt.encapsulatedFaceVerification({\n  completionCallback: function(success, jsonResponse) {\n    if (success) {\n      alert('Successfully verified face');\n    }\n  }\n});\n```\n\n##### Video Verification\n```javascript\nmyVoiceIt.encapsulatedVideoVerification({\n  contentLanguage: 'en-US',\n  phrase: 'Never forget tomorrow is a new day',\n  needEnrollmentsCallback: function() {\n    alert('A minimum of three enrollments are needed');\n  },\n  completionCallback: function(success, jsonResponse) {\n    if (success) {\n      alert('Successfully verified face and voice');\n    }\n  }\n});\n```\n\n### Implementation Diagram\n\n\u003cimg src=\"https://raw.githubusercontent.com/voiceittech/voiceit3-web-sdk/main/voiceit3-graphics/diagram.png\" width=\"70%\" style=\"width:70%\" /\u003e\n\n### Changing the Content Language\n\nThe content language is configured in each backend's config file:\n\n* **PHP:** Set `CONTENT_LANGUAGE` in `voiceit3-php-server-example/config.php`\n* **NodeJS:** Set `CONTENT_LANGUAGE` in `voiceit3-node-server-example/config.js`\n* **Go:** Set `CONTENT_LANGUAGE` in `voiceit3-go-server-example/config.go`\n\n\n## Documentation\n\nFor detailed API documentation, visit [voiceit.io/documentation](https://voiceit.io/documentation).\n\n## Support\n\nIf you find this SDK useful, please consider giving it a star on GitHub — it helps others discover the project!\n\n[![GitHub stars](https://img.shields.io/github/stars/voiceittech/voiceit3-web-sdk?style=social)](https://github.com/voiceittech/voiceit3-web-sdk/stargazers)\n\n## License\n\nvoiceit3-web-sdk is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoiceittech%2Fvoiceit3-web-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoiceittech%2Fvoiceit3-web-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoiceittech%2Fvoiceit3-web-sdk/lists"}