TimeFrame t;
SpeechResult result;
for (SpeakerCluster spk : speakers) {
Stats stats = recognizer.createStats(1);
ArrayList<Segment> segments = spk.getSpeakerIntervals();
for (Segment s : segments) {
long startTime = s.getStartTime();
long endTime = s.getStartTime() + s.getLength();
t = new TimeFrame(startTime, endTime);
recognizer.startRecognition(url.openStream(), t);
while ((result = recognizer.getResult()) != null) {
stats.collect(result);
}
recognizer.stopRecognition();
}
Transform profile;
// Create the Transformation
profile = stats.createTransform();
recognizer.setTransform(profile);
for (Segment seg : segments) {
long startTime = seg.getStartTime();
long endTime = seg.getStartTime() + seg.getLength();