Showing posts with label iOS applications development. Show all posts
Showing posts with label iOS applications development. Show all posts

Speech Recognition in iOS Application

A Speech Recognition (SR) is a technique to identify audible words and phrases in spoken languages and convert them to machine-readable format.

The whole concept of Speech Recognition works mainly bases on two things one that is how accurately the program reads the audible voices and second is how much the database is accurate to handle a multiple languages and multiple voices, These two are major components to develop a perfect Speech Recognition System.
Speech Recognition in iOS Application
What can we do with Speech Recognition?

  1. Speech Recognition provides a different level of experience to user, User can have a full control of system by speaking just a several voice commands and the entire system will work without a press of any single button or without a touch of single thing.
  2. Opens an accessibility path for the deaf & hard hearing.
  3. Person is free to use SR System at any time while driving, cooking, jogging etc.
  4. SR can reach a gaming world to some another direction instead of pressing a single key, user can have just a simple voice commands to interact with game this provides a real-time SR, in Gaming world.
  5. Speech Recognition can be useful for Identification of a particular user by implementing intelligent SR System, Which scans user’s voice and provide an identification of user.
  6. The application created based on SR can be used as Virtual Assistance like a Siri application in iOS.

Libraries for Speech Recognition in iOS

There are several commercial libraries as well as Open Source libraries are available to implement SR in iOS applications. All libraries have it’s own advantages and disadvantages with respect to it’s functionality, performance, cost, stability, capability etc. Following are list of some libraries that are available for iOS.

1. PocketSphinx:

Pocket Sphinx is the Open Source library. This library has lots of advantages as compare other libraries, It provides support for both desktop apps as well as mobile apps, Provides a cross-platform supports like Linux, Windows, Mac OS X, iOS, python language binding, even experimental support for Nokia S60v3 and Windows Mobiles.

Implementation of PocketSphinx is quite difficult as compare to other libraries as it has not proper documentation support for developers.

2. VocalKit:

VocalKit is a free library and wrapper for already available library (Pocket Sphinx), main aim to develop this library is to provide ease to use voice recognition solutions, but now a days VocalKit is not preferable to use as much better library openEars came out.

3. OpenEars:

openEars is a free library for offline Speech Recognition and Text To Speech. The library has no any hidden costs or account to setup. OpenEars makes it simple to add Speech Recognition by providing a well-written document, openEars featuring high performance, low CPU usage, multiple voices and more.

openEars also provides some paid plugins support for several new speech features into your application to provides a live speech recognition in realtime. It is very much responsive that it can be used as a gaming input without the use of network connection, NeatSpeech is a another plugin for openEars which add improved voices which sound better and continuously even on long sentences, Rejecto is a vocabulary rejection plugin for the words and noises which aren’t in the app’s vocabulary, SaveThatWave is a plugin which adds a capability to record audio files from speech.

4. iVona:

iVona is a paid library provides a reach documentation help and tutorials about how to use it’s library. It provides a SDK for variety of platforms like Linux, iOS, Windows mobile, Mac OS, and etc. iVona provides a support for variety of languages like Tatyana, Mads etc.

iOS 7 & Speech Recognition:

Apple has provides a “1500 new APIs” with NDA of iOS7, One of them is AVSpeechSynthesier. AVSpeechSynthesier is Text To Speech that is a part of AVFoundation framework and provides a very easy way to have iOS read a piece of text.

AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc] init]; AVSpeechUtterance *utterance = [AVSpeechUtterance speechUtteranceWithString:@"Hey, how are you?"]; utterance.rate = AVSpeechUtteranceMinimumSpeechRate; // Tell it to me slowly [synthesizer speakUtterance:utterance];


Enjoy to make an iPhone an iPad application that fun with voice. SPEC INDIA is a leading mobile apps development company offering different custom applications, enterprise mobile app development for global clients. Our skilled mobility expert team delivers high quality, effective, efficient and user-friendly applications that meet our client’s expectations.

Get Started with Geofencing on iOS Device

iOS provides its great core location services. To explore these services one need to use the core location framework. There are lots of apps increasing day by day that are based on location services. You can create an iOS application that provides all the information regarding the region and all the surrounding objects that exist around the user. You can create and monitor the regions as per your requirement. Here monitoring means, your app keeps checking that whether you have been in or out from any geofenced regions.

Geofencing is basically used to monitor the regions or the locations from your app, iOS provide some features using which you can monitor the regions. For example you want to monitor that in which region you are entering and in which region you are exiting. This monitoring feature of this app can manage all these.

To create and implement this type of iOS application, you should have started the location services on your device. Some services are supported in some versions only so; you should care about this while developing any app regarding this. To get the location details, you should configure the core location object and should be easily get the location through Wi-Fi network.

Once you configure the location manager and implement the delegate in your class, you must implement the delegate methods in order to get the surrounding information and location information in your app. Before starting the iOS applications development, you need to have some regions data like coordinate, which represents the region, radius of that region in which you want to monitor and a unique name, which can be used to identify the regions uniquely. You can store those data into a plist file or whatever suitable to you.


Configure your app for location services:

First of all you need to check the location services whether services are enabled or not. If services are disabled, you need to show proper message to the user in order to start the location services. The below code will check the location services are enabled or not.


if(![CLLocationManager locationServicesEnabled])
    {
        NSLog(@"Location services are disabled. Please start the location services.");
    }
    else
    {
        locationManager  = [[CLLocationManager alloc]init];
        locationManager.delegate = self;
        locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters;
        [locationManager startUpdatingLocation];
    }


If location services are disabled, you need to make it enable in order to work fine for this iOS application. Once location services are enabled, you can start monitoring the regions. The below code described that how to monitor the regions.


for(int i=0;i<locations.count;i++)
    {
        CLLocation *location = [locations objectAtIndex:i];
        CLRegion *region = [[CLRegion alloc]initCircularRegionWithCenter:CLLocationCoordinate2DMake(location.coordinate.latitude, location.coordinate.longitude) radius:100.0 identifier: @"Your Identifer"];
        [locationManager startMonitoringForRegion:region];
    }

Here you can also specify the region identifier also. So that you can easily identify the monitoring regions. Once you have started the regions under the monitoring of location manager, it will automatically keep monitoring the regions. As there is any change in the location or the region of your or user’s region, the location manager will automatically call the delegate methods, so that you can notify the user about the regions changes or location change for the specified region.

Location manager will call the following method when any region is put under the monitoring.

-(void)locationManager:(CLLocationManager *)manager didStartMonitoringForRegion:(CLRegion *)region
{
    [self showAlert:[NSString stringWithFormat:@"Started Monitoring region : %@ - Region",region.identifier]];
}

Once the monitoring is started, it will give the location change updates in the following method.

-(void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region
{
    [self showAlert:[NSString stringWithFormat:@"You are entering : %@ - Region",region.identifier]];
}

-(void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region
{
    [self showAlert:[NSString stringWithFormat:@"You are exiting : %@ - Region",region.identifier]];
}
 

The two methods described above called when user changes his/her region. First method didEnterRegion: will be called when user is entering in any region, which is under monitoring. And second method will be called when user is exiting from any region, which is under monitoring.

 
Mobile App Development © 2012 | Designed by SPEC INDIA