(self)
return chron_file
@return:  String in Chronological TextGrid file format.
def to_chron(self):
    """ 
        @return:  String in Chronological TextGrid file format.
        """

    chron_file = ""
    chron_file += "\"Praat chronological TextGrid text file\"\n"
    chron_file += str(self.xmin) + " " + str(self.xmax)
    chron_file += "   ! Time domain.\n"
    chron_file += str(self.size) + "   ! Number of tiers.\n"
    for tier in self.tiers:
      idx = (self.tiers.index(tier)) + 1
      tier_header = "\"" + tier.classid + "\" \"" \
                    + tier.nameid + "\" " + str(tier.xmin) \
                    + " " + str(tier.xmax)
      chron_file += tier_header + "\n"
      transcript = tier.simple_transcript
      for (xmin, xmax, utt) in transcript:
        chron_file += str(idx) + " " + str(xmin)
        chron_file += " " + str(xmax) + "\n"
        chron_file += "\"" + utt + "\"\n"
    return chron_file
def to_chron ( self ) : chron_file = "" chron_file += "\"Praat chronological TextGrid text file\"\n" chron_file += str ( self . xmin ) + " " + str ( self . xmax ) chron_file += "   ! Time domain.\n" chron_file += str ( self . size ) + "   ! Number of tiers.\n" for tier in self . tiers : idx = ( self . tiers . index ( tier ) ) + 1 tier_header = "\"" + tier . classid + "\" \"" + tier . nameid + "\" " + str ( tier . xmin ) + " " + str ( tier . xmax ) chron_file += tier_header + "\n" transcript = tier . simple_transcript for ( xmin , xmax , utt ) in transcript : chron_file += str ( idx ) + " " + str ( xmin ) chron_file += " " + str ( xmax ) + "\n" chron_file += "\"" + utt + "\"\n" return chron_file