コード例 #1
0
        public static void main(string[] args)
        {
            SpeakerIdentification speakerIdentification = new SpeakerIdentification();
            URL resource = ClassLiteral <SpeakerIdentificationDemo> .Value.getResource("test.wav");

            ArrayList speakers = speakerIdentification.cluster(resource.openStream());

            SpeakerIdentificationDemo.printSpeakerIntervals(speakers, resource.getPath());
            SpeakerIdentificationDemo.speakerAdaptiveDecoding(speakers, resource);
        }
コード例 #2
0
        public static void printSpeakerIntervals(ArrayList speakers, string fileName)
        {
            int      num      = 0;
            Iterator iterator = speakers.iterator();

            while (iterator.hasNext())
            {
                SpeakerCluster speakerCluster = (SpeakerCluster)iterator.next();
                num++;
                ArrayList speakerIntervals = speakerCluster.getSpeakerIntervals();
                Iterator  iterator2        = speakerIntervals.iterator();
                while (iterator2.hasNext())
                {
                    Segment segment = (Segment)iterator2.next();
                    [email protected](new StringBuilder().append(fileName).append("  ").append(SpeakerIdentificationDemo.time(segment.getStartTime())).append(" ").append(SpeakerIdentificationDemo.time(segment.getLength())).append(" Speaker").append(num).toString());
                }
            }
        }