Skip to content

Commit

Permalink
style: reformat make_smil.py docstring to Google format, as per issue #…
Browse files Browse the repository at this point in the history
  • Loading branch information
joanise committed Sep 3, 2021
1 parent ed66f0d commit f0aba91
Showing 1 changed file with 11 additions and 23 deletions.
34 changes: 11 additions & 23 deletions readalongs/text/make_smil.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
####################################################################


from __future__ import absolute_import, division, print_function, unicode_literals

import argparse

import pystache
Expand Down Expand Up @@ -40,15 +38,11 @@
def parse_hypseg(text):
""" Parse hypseg alignments file and return alignements
Parameters
----------
text : str
hypseg text
Args:
text(str): hypseg text
Returns
-------
dict
returns a dictionary of all start and end points for each word in text
Returns:
dict: a dictionary of all start and end points for each word in text
"""
results = {"words": []}
tokens = text.strip().split()
Expand All @@ -69,19 +63,13 @@ def parse_hypseg(text):
def make_smil(text_path: str, audio_path: str, results: dict) -> str:
""" Actually render the SMIL
Parameters
----------
text_path : str
path to text
audio_path : str
path to audio
results : dict
all alignements
Returns
-------
str
formatted SMIL
Args:
text_path(str): path to text
audio_path(str): path to audio
results(dict): all alignements
Returns:
str: formatted SMIL
"""
results["text_path"] = text_path
results["audio_path"] = audio_path
Expand Down

0 comments on commit f0aba91

Please sign in to comment.