Package com.sun.speech.freetts

# Class PhoneSetImpl

java.lang.Object
com.sun.speech.freetts.PhoneSetImpl

All Implemented Interfaces:
  `PhoneSet`

public class PhoneSetImpl extends Object implements PhoneSet
Implementation of a `PhoneSet` that reads the info from a file. The format of the file is as follows:

     phone feature value
     phone feature value
     phone feature value
     ...

Where `phone` is the phone name, `feature` is the phone feature such as "vc," "vlng," "vheight," and so on, and "value" is the value of the feature. There can be multiple lines for the same phone to describe various features of that phone.

## Field Summary

### Fields inherited from interface com.sun.speech.freetts.PhoneSet

`CPLACE, CTYPE, CVOX, VC, VFRONT, VHEIGHT, VLNG, VRND`

## Constructor Summary

Constructors
Constructor
Description
`PhoneSetImpl(URL url)`
Create a new `PhoneSetImpl` by reading from the given URL.

## Method Summary

Modifier and Type
Method
Description
`String`
`getPhoneFeature(String phone, String featureName)`
Given a phoneme and a feature name, returns the feature.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PhoneSetImpl

public PhoneSetImpl(URL url) throws IOException
Create a new `PhoneSetImpl` by reading from the given URL.

Parameters:
  `url` - the input source
Throws:
  `IOException` - if an error occurs

## Method Details

### getPhoneFeature

public String getPhoneFeature(String phone, String featureName)
Given a phoneme and a feature name, returns the feature.

Specified by:
  `getPhoneFeature` in interface `PhoneSet`
Parameters:
  `phone` - the phoneme of interest
  `featureName` - the name of the feature of interest
Returns:
  the feature with the given name