Skip to main content

fave-syllabify

PyPI version Lint and Test Build Docs codecov DOI

Syllabify a force-aligned TextGrid

Installation

pip install fave-syllabify

Usage

Import classes and functions

from aligned_textgrid import AlignedTextGrid, custom_classes
from fave_syllabify import syllabify_tg
from pathlib import Path

Read in a textgrid

tg = AlignedTextGrid(
    textgrid_path=Path(
        "docs",
        "data",
        "josef-fruehwald_speaker.TextGrid"
    ),
    entry_classes=custom_classes(
        ["Word", "Phone"]
    )
)

print(tg)
AlignedTextGrid with 1 groups named ['group_0'] each with [2] tiers. [['Word', 'Phone']]

Syllabify the textgrid

syllabify_tg(tg)

print(tg)
AlignedTextGrid with 1 groups named ['group_0'] each with [4] tiers. [['Word', 'Syllable', 'SylPart', 'Phone']]

Exploring the syllabification

word_tier = tg.group_0.Word
raindrops = word_tier[5]

print(raindrops.label)
raindrops

Each syllable is labelled with its stress.

print([
    syl.label 
    for syl in raindrops.contains
])
['syl-1', 'syl-2']

Each syllable contains its constituent parts in a flat hierarchy (there’s no rhyme constituent).

syl = raindrops.first.fol
print([
    part.label
    for part in syl.contains
])
['onset', 'nucleus', 'coda']

Each constituent contains its relevant phone.

onset = syl.onset
print([
    phone.label
    for phone in onset
])
['D', 'R']

Release files for fave-syllabify 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fave-syllabify 0.1.3
File Size Uploaded
fave_syllabify-0.1.3.tar.gz 16.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fave-syllabify 0.1.3
File Interpreter ABI Platform
fave_syllabify-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 32.0 kB

Release files / fave_syllabify-0.1.3.tar.gz

Download URL fave_syllabify-0.1.3.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a565db9c6faeee9b7943c4c2cca6b014b64a9b0df0ddfa1bb7a8cd3ef0952177
BLAKE2b-256 checksum
How to use checksums
e01306e19f74ed0f73f3ce52d6ff421cef31f0bce792e2042ac92076bc1b2c65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.1 CPython/3.10.7 Darwin/23.2.0

Release files / fave_syllabify-0.1.3-py3-none-any.whl

Download URL fave_syllabify-0.1.3-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
331d97b6c8e3f3baac318aa4d22797593f65717e4474a426c174c2c66e6b112f
BLAKE2b-256 checksum
How to use checksums
cac292c895654306fc6515f5e4748cc441c493bff99a2c847d90ff47faa30bce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.1 CPython/3.10.7 Darwin/23.2.0

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page