{"id":32312525,"url":"https://github.com/appdevguy/ossspeechkit","last_synced_at":"2025-10-23T09:57:04.679Z","repository":{"id":45846606,"uuid":"190594291","full_name":"AppDevGuy/OSSSpeechKit","owner":"AppDevGuy","description":"OSSSpeechKit offers a native iOS Speech wrapper for AVFoundation and Apple's Speech.","archived":false,"fork":false,"pushed_at":"2024-04-22T02:16:06.000Z","size":1447,"stargazers_count":164,"open_issues_count":13,"forks_count":42,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-23T09:57:03.903Z","etag":null,"topics":["avfoundation","cocoapod","ios","pod","speech","speech-api","speech-recognition","speech-to-text","swift","swift5","text-to-speech"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/AppDevGuy.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":"2019-06-06T14:19:53.000Z","updated_at":"2025-09-09T03:54:23.000Z","dependencies_parsed_at":"2024-04-22T02:38:37.061Z","dependency_job_id":"715e522f-e18a-439d-85ee-fa98eadecf2d","html_url":"https://github.com/AppDevGuy/OSSSpeechKit","commit_stats":{"total_commits":117,"total_committers":2,"mean_commits":58.5,"dds":"0.19658119658119655","last_synced_commit":"bcb7ae645669c56a993b5ebc48e893f6c58c04c3"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/AppDevGuy/OSSSpeechKit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppDevGuy%2FOSSSpeechKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppDevGuy%2FOSSSpeechKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppDevGuy%2FOSSSpeechKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppDevGuy%2FOSSSpeechKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AppDevGuy","download_url":"https://codeload.github.com/AppDevGuy/OSSSpeechKit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AppDevGuy%2FOSSSpeechKit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280598940,"owners_count":26357977,"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","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"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":["avfoundation","cocoapod","ios","pod","speech","speech-api","speech-recognition","speech-to-text","swift","swift5","text-to-speech"],"created_at":"2025-10-23T09:57:01.440Z","updated_at":"2025-10-23T09:57:04.664Z","avatar_url":"https://github.com/AppDevGuy.png","language":"Swift","readme":"# OSSSpeechKit\n\n[![OSSSpeechKit Logo](https://appdevguy.github.io/OSSSpeechKit/OSSSpeechKit-Logo.png)](https://github.com/AppDevGuy/OSSSpeechKit)\n\n[![Build Status](https://travis-ci.org/AppDevGuy/OSSSpeechKit.svg?branch=master)](https://travis-ci.org/AppDevGuy/OSSSpeechKit)\n[![Version](https://img.shields.io/cocoapods/v/OSSSpeechKit.svg?style=flat)](https://cocoapods.org/pods/OSSSpeechKit)\n[![License](https://img.shields.io/cocoapods/l/OSSSpeechKit.svg?style=flat)](https://cocoapods.org/pods/OSSSpeechKit)\n[![Platform](https://img.shields.io/cocoapods/p/OSSSpeechKit.svg?style=flat)](https://cocoapods.org/pods/OSSSpeechKit)\n[![codecov](https://codecov.io/gh/AppDevGuy/OSSSpeechKit/branch/master/graph/badge.svg)](https://codecov.io/gh/AppDevGuy/OSSSpeechKit)\n[![docs](https://appdevguy.github.io/OSSSpeechKit/badge.svg)](https://appdevguy.github.io/OSSSpeechKit)\n\nOSSSpeechKit was developed to provide easier accessibility options to apps.\n\nApple does not make it easy to get the right voice, nor do they provide a simple way of selecting a language or using speech to text. OSSSpeechKit makes the hassle of trying to find the right language go away.\n\n# Requirements\n\n- Swift 5.0 or higher\n- iOS 13.0 or higher\n- Cocoapods\n\n# Supported Languages\n\nThe table below shows the original 37 languages first supported. Since v0.3.3, an additional 10 languages have been added.\n\n\u003ctable class=\"tg\" style=\"width: 100%;\"\u003e \u003ctr\u003e \u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e English - Australian\u003cbr\u003e🇦🇺 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Hebrew\u003cbr\u003e🇮🇱 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Japanese\u003cbr\u003e🇯🇵 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Romanian\u003cbr\u003e🇷🇴 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Swedish\u003cbr\u003e🇸🇪 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Norsk\u003cbr\u003e🇳🇴 \u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e \u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Portuguese - Brazilian\u003cbr\u003e🇧🇷 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Hindi - Indian\u003cbr\u003e🇮🇳 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Korean\u003cbr\u003e🇰🇷 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Russian\u003cbr\u003e🇷🇺 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Chinese - Taiwanese\u003cbr\u003e🇹🇼 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Dutch - Belgium\u003cbr\u003e🇧🇪 \u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e \u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e French - Canadian\u003cbr\u003e🇨🇦 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Hungarian\u003cbr\u003e🇭🇺 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Spanish - Mexican\u003cbr\u003e🇲🇽 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Arabic - Saudi Arabian\u003cbr\u003e🇸🇦 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Thai\u003cbr\u003e🇹🇭 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e French\u003cbr\u003e🇫🇷 \u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e \u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Chinese\u003cbr\u003e🇨🇳 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Indonesian\u003cbr\u003e🇮🇩 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Norwegian\u003cbr\u003e🇳🇴 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Slovakian\u003cbr\u003e🇸🇰 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Turkish\u003cbr\u003e🇹🇷 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Finnish\u003cbr\u003e🇫🇮 \u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e \u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Chinese - Hong Kong\u003cbr\u003e🇭🇰 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e English - Irish\u003cbr\u003e🇮🇪 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Polish\u003cbr\u003e🇵🇱 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e English - South African\u003cbr\u003e🇿🇦 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e English - United States\u003cbr\u003e🇺🇸 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Danish\u003cbr\u003e🇩🇰 \u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e \u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Czech\u003cbr\u003e🇨🇿 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Italian\u003cbr\u003e🇮🇹 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Portuguese\u003cbr\u003e🇵🇹 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Spanish\u003cbr\u003e🇪🇸 \u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e English\u003cbr\u003e🇬🇧\u003c/td\u003e\u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Dutch\u003cbr\u003e🇳🇱 \u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e \u003ctd class=\"tg-xldj\" style=\"width: 20%; text-align:center; vertical-align: middle;\"\u003e Greek\u003cbr\u003e🇬🇷 \u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n# Features\n\nOSSSpeechKit offers simple **text to speech** and **speech to text** in 47 different languages.\n\nOSSSpeechKit is built on top of both the [AVFoundation](https://developer.apple.com/documentation/avfoundation) and [Speech](https://developer.apple.com/documentation/speech) frameworks.\n\nYou can achieve text to speech or speech to text in as little as two lines of code.\n\nThe speech will play over the top of other sounds such as music.\n\n# Installation\n\nOSSSpeechKit is available through [CocoaPods](https://cocoapods.org). To install it, simply add the following line to your Podfile:\n\n```ruby\npod 'OSSSpeechKit'\n```\n\n# Implementation\n\n## Text to Speech\n\nThese methods enable you to pass in a string and hear the text played back using.\n\n### Simple\n\n```swift\nimport OSSSpeechKit\n\n.....\n\n// Declare an instance of OSSSpeechKit\nlet speechKit = OSSSpeech.shared\n// Set the voice you wish to use - currently upper case for formality or language and country name\nspeechKit.voice = OSSVoice(quality: .enhanced, language: .Australian)\n// Set the text in the language you have set\nspeechKit.speakText(text: \"Hello, my name is OSSSpeechKit.\")\n```\n\n### Advanced\n\n```swift\nimport OSSSpeechKit\n\n.....\n\n// Declare an instance of OSSSpeechKit\nlet speechKit = OSSSpeech.shared\n// Create a voice instance\nlet newVoice = OSSVoice()\n// Set the language\nnewVoice.language = OSSVoiceEnum.Australian.rawValue\n// Set the voice quality\nnewVoice.quality = .enhanced\n// Set the voice of the speech kit\nspeechKit.voice = newVoice\n// Initialise an utterance\nlet utterance = OSSUtterance(string: \"Testing\")\n// Set the recognition task type\nspeechKit.recognitionTaskType = .dictation\n// Set volume\nutterance.volume = 0.5\n// Set rate of speech\nutterance.rate = 0.5\n// Set the pitch\nutterance.pitchMultiplier = 1.2\n// Set speech utterance\nspeechKit.utterance = utterance\n// Ask to speak\nspeechKit.speakText(text: utterance.speechString)\n```\n\n## Speech to Text\n\nCurrently speech to text is offered in a very simple format. Starting and stopping of recording is handled by the app.\n\n### iOS 13 On-Device Speech to Text support is now available as of 0.3.0 🎉\n\nSpeechKit implements delegates to handle the recording authorization, output of text and failure to record.\n\n```swift\nspeechKit.delegate = self\n// Call to start and end recording.\nspeechKit.recordVoice()\n// Call to end recording\nspeechKit.endVoiceRecording()\n```\n\nIt is important that you have included in your `info.plist` the following:\n\n\u003e Privacy - Speech Recognition Usage Description\n\n\u003e Privacy - Microphone Usage Description\n\nWithout these, you will not be able to access the microphone nor speech recognition.\n\n### Delegates\n\nHandle returning authentication status to user - primary use is for non-authorized state.\n\n\u003e `func authorizationToMicrophone(withAuthentication type: OSSSpeechKitAuthorizationStatus)`\n\nWhen the microphone has finished accepting audio, this delegate will be called with the final best text output.\n\n\u003e `func didFailToCommenceSpeechRecording()`\n\nIf the speech recogniser and request fail to set up, this method will be called.\n\n\u003e `func didFinishListening(withText text: String)`\n\nFor further information you can [check out the Apple documentation directly.](https://developer.apple.com/documentation/speech/sfspeechrecognizer)\n\n# Other Features\n\n### List all available voices:\n\n```swift\nlet allLanguages = OSSVoiceEnum.allCases\n```\n\n### Get specific voice information:\n\n```swift\n// All support languages\nlet allVoices = OSSVoiceEnum.allCases\n// Language details\nlet languageInformation = allVoices[0].getDetails()\n// Flag of country\nlet flag = allVoices[0].flag\n```\n\nThe `getDetails()` method returns a struct containing:\n\n```swift\nOSSVoiceInfo {\n    /// The name of the voice; All AVSpeechSynthesisVoice instances have a persons name.\n    var name: String?\n    /// The name of the language being used.\n    var language: String?\n    /// The language code is what is internationally used in Locale settings.\n    var languageCode: String?\n    /// Identifier is a unique bundle url provided by Apple for each AVSpeechSynthesisVoice.\n    var identifier: Any?\n}\n```\n\n### Other Info\n\nThe `OSSVoiceEnum` contains other methods, such as a hello message, title variable and subtitle variable so you can use it in a list.\n\nYou can also set the speech:\n\n- volume\n- pitchMultiplier\n- rate\n\nAs well as using an `NSAttributedString`.\n\nThere are plans to implement flags for each country as well as some more features, such as being able to play the voice if the device is on silent.\n\nIf the language or voice you require is not available, this is either due to:\n\n- Apple have not made it available through their AVFoundation;\n- or the SDK has not been updated to include the newly added voice.\n\n# Important Information\n\nApple do not make the voice of Siri available for use.\n\nThis kit provides Apple's AVFoundation voices available and easy to use, so you do not need to know all the voice codes, among many other things.\n\nTo say things correctly in each language, you need to set the voice to the correct language and supply that languages text; this SDK is not a translator.\n\n### Code Example:\n\nYou wish for you app to use a Chinese voice, you will need to ensure the text being passed in is Chinese.\n\n_Disclaimer: I do not know how to speak Chinese, I have used Google translate for the Chinese characters._\n\n#### Correct:\n\n```swift\nspeechKit.voice = OSSVoice(quality: .enhanced, language: .Chinese)\nspeechKit.speakText(text: \"你好我的名字是 ...\")\n```\n\n#### Incorrect:\n\n```swift\nspeechKit.voice = OSSVoice(quality: .enhanced, language: .Australian)\nspeechKit.speakText(text: \"你好我的名字是 ...\")\n```\n\nOR\n\n```swift\nspeechKit.voice = OSSVoice(quality: .enhanced, language: .Chinese)\nspeechKit.speakText(text: \"Hello, my name is ...\")\n```\n\nThis same principle applies to all other languages such as German, Saudi Arabian, French, etc.. Failing to set the language for the text you wish to be spoken will not sound correct.\n\n# Contributions and Queries\n\nIf you have a question, please create a ticket or email me directly.\n\nIf you wish to contribute, please create a pull request.\n\n# Example Project\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n# Unit Tests\n\nFor further examples, please look at the Unit Test class.\n\n# Author\n\nApp Dev Guy\n\n\u003ca href=\"https://stackoverflow.com/users/4008175/app-dev-guy\"\u003e\u003cimg src=\"https://stackoverflow.com/users/flair/4008175.png\" width=\"208\" height=\"58\" alt=\"profile for App Dev Guy at Stack Overflow, Q\u0026amp;A for professional and enthusiast programmers\" title=\"profile for App Dev Guy at Stack Overflow, Q\u0026amp;A for professional and enthusiast programmers\"\u003e\u003c/a\u003e\n\n# License\n\nOSSSpeechKit is available under the MIT license. See the LICENSE file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappdevguy%2Fossspeechkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappdevguy%2Fossspeechkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappdevguy%2Fossspeechkit/lists"}