{"id":13749076,"url":"https://github.com/hyperloop-modules/titanium-speech","last_synced_at":"2025-05-09T11:31:59.881Z","repository":{"id":86299654,"uuid":"67542320","full_name":"hyperloop-modules/titanium-speech","owner":"hyperloop-modules","description":"Use the iOS 10 SFSpeechRecognizer API in JavaScript with Appcelerator Hyperloop.","archived":false,"fork":false,"pushed_at":"2023-03-21T14:41:02.000Z","size":9096,"stargazers_count":21,"open_issues_count":7,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-08T09:02:51.810Z","etag":null,"topics":["appcelerator-hyperloop","hyperloop","ios","javascript","native","speech-recognition"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperloop-modules.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-09-06T20:01:12.000Z","updated_at":"2024-01-12T13:10:19.000Z","dependencies_parsed_at":"2024-01-17T13:12:18.830Z","dependency_job_id":"86ddefae-977d-48a4-a070-63b6086ca0b6","html_url":"https://github.com/hyperloop-modules/titanium-speech","commit_stats":null,"previous_names":["hyperloop-modules/ti.speech"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperloop-modules%2Ftitanium-speech","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperloop-modules%2Ftitanium-speech/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperloop-modules%2Ftitanium-speech/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperloop-modules%2Ftitanium-speech/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperloop-modules","download_url":"https://codeload.github.com/hyperloop-modules/titanium-speech/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253240350,"owners_count":21876593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["appcelerator-hyperloop","hyperloop","ios","javascript","native","speech-recognition"],"created_at":"2024-08-03T07:00:54.938Z","updated_at":"2025-05-09T11:31:54.868Z","avatar_url":"https://github.com/hyperloop-modules.png","language":"JavaScript","readme":"Ti.Speech\n---\niOS 10 speech-recognition with Appcelerator Hyperloop.\n\n### Requirements\n- [x] Titanium SDK 5.5.0.GA+\n- [x] Hyperloop 2.0.0+\n- [x] Xcode 8+\n- [x] Include the following keys in the plist-section of your tiapp.xml:\n```xml\n\u003ckey\u003eNSSpeechRecognitionUsageDescription\u003c/key\u003e\n\u003cstring\u003eCan we parse your spoken words?\u003c/string\u003e\n\n\u003ckey\u003eNSMicrophoneUsageDescription\u003c/key\u003e\n\u003cstring\u003eCan we use the microphone for real-time speech recognition?\u003c/string\u003e\n```\n\n### Usage\n\n#### Getting started using example app\n1. Copy example app from here: https://github.com/hyperloop-modules/ti.speech/tree/master/example\n2. Import app into your account using `appc new --import`\n3. Enable Hyperloop platform services when being asked\n4. Run the app with `appc run -p ios -I 10.0`\n\n\n#### Creating a new app\n1. Create a new project with `appc new -p ios`\n2. Enable Hyperloop platform services when being asked\n3. Copy the `ti.speech` in your project and use code from examples (or example app)\n4. Run the app with `appc run -p ios -I 10.0`\n\n### Examples\n\nYou can use speech recognition with real-time audio or with pre-recorded media files (audio or video).  See [example file](https://github.com/hyperloop-modules/ti.speech/blob/master/example/app/controllers/index.js) for more details.\n\n\n#### Recognize from File URL\n```js \nvar TiSpeech = require(\"ti.speech\");\nTiSpeech.initialize(\"en_US\");  // locale is optional\n\nvar win = Ti.UI.createWindow({\n    backgroundColor: \"#fff\"\n});\n\nvar btn = Ti.UI.createButton({\n    title: \"Recognize pre-recorded speech\"\n});\n\nif (!TiSpeech.isSupported()) {\n    alert(\"Speech recognition is not available on this device!\");\n    btn.setEnabled(false);\n}\n\nbtn.addEventListener(\"click\", function() {\n    TiSpeech.recognize({\n        type: TiSpeech.SOURCE_TYPE_URL, // optional, as it defaults to this if url is defined\n        url: \"one_more_thing.mp3\",\n        progress: function(e) {\n            Ti.API.info(e.value);\n        }\n    });\n});\n\nwin.add(btn);\nwin.open();\n```\n\n#### Recognize from Audio Input\n```js \nvar TiSpeech = require(\"ti.speech\");\nTiSpeech.initialize(\"en_US\");  // locale is optional\n\nvar win = Ti.UI.createWindow({\n    backgroundColor: \"#fff\"\n});\n\nvar btn = Ti.UI.createButton({\n    title: \"Recognize real-time speech\"\n});\n\nif (!TiSpeech.isAvailable()) {\n    alert(\"Speech recognition is not available on this device!\");\n    btn.setEnabled(false);\n}\n\nbtn.addEventListener(\"click\", function() {\n    TiSpeech.startRecognition({\n        type: TiSpeech.SOURCE_TYPE_MICROPHONE, // optional, as it defaults to this if url is undefined\t\t\n        progress: function(e) {\n            Ti.API.info(e.value);\n        }\n    });\n});\n\nwin.add(btn);\nwin.open();\n\n```\n\n### Author\n* Hans Knoechel ([@hansemannnn](https://twitter.com/hansemannnn))\n* Brenton House ([@brentonhouse](https://twitter.com/brentonhouse))\n\n### License\nApache 2.0\n\n### Contributing\nCode contributions are greatly appreciated, please submit a new [pull request](https://github.com/hyperloop-modules/ti.speech/pull/new/master)!\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperloop-modules%2Ftitanium-speech","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperloop-modules%2Ftitanium-speech","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperloop-modules%2Ftitanium-speech/lists"}