Git Product home page Git Product logo

Comments (3)

georgid avatar georgid commented on June 2, 2024

concatenate in chrono order one after the other: first make sure they have same number of tiers

python ~/Downloads/TextGridTools-master/scripts/tgt-concatenate-textgrids.py -i 727cff89-392f-4d15-926d-63b2697d7f3f.TextGrid 727cff89-392f-4d15-926d-63b2697d7f3f_71.389446_82.591367.TextGrid -o 727cff89-392f-4d15-926d-63b2697d7f3f.TextGrid

script to shift first tier

python ~/Downloads/TextGridTools-master/scripts/tgt-shift-boundaries.py 20.867514 727cff89-392f-4d15-926d-63b2697d7f3f/727cff89-392f-4d15-926d-63b2697d7f3f_20.867514_31.168639.TextGrid

from alignmentduration.

georgid avatar georgid commented on June 2, 2024
import os
import tgt
shiftTime = 20.867514

tiers_ = []
tgtURI = '/home/georgid/Documents/makam_acapella/727cff89-392f-4d15-926d-63b2697d7f3f/727cff89-392f-4d15-926d-63b2697d7f3f.TextGrid'

from tgt.util import shift_boundaries
tg = tgt.read_textgrid(tgtURI)

tier = tg.get_tier_by_name("phonemes")
##### this part does not work
# tierShifted = shift_boundaries(tier, shiftTime,0)
# a = tier.intervals
# for anno in a[:25]:

#     anno.end_time += 11
#     anno.start_time +=  11

#     tier.add_interval(anno)

####### makes sense only if tier consists of one section to repeat
tier2 = tgt.util.concatenate_tiers(tier, tier, shiftTime)
print tier2

tg.add_tier(tier2)
# tg.delete_tier(tier)

pathOut = '/home/georgid/Documents/makam_acapella/727cff89-392f-4d15-926d-63b2697d7f3f/727cff89-392f-4d15-926d-63b2697d7f3f.TextGrid'
# tgt.write_to_file(tg, pathOut)

from alignmentduration.

georgid avatar georgid commented on June 2, 2024

added whole TextGrids in a new repository https://github.com/georgid/makam_acapella

from alignmentduration.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.