The Zen of Python (PEP 20)
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
from functools import reduce | |
from pathlib import Path | |
import speech_recognition as sr | |
from pydub import AudioSegment | |
def transcribe(wav: Path, start_at=0, iteration=10): | |
"""Use start_at when transcription hangs and does not work.""" | |
transcription_path = wav.with_suffix('.txt') |
"""TimeZone is an immutable (frozen) tzinfo implementation with *nice* offsets: utc[+2:00], utc[+1:30].""" | |
__author__ = "Misha Drachuk" | |
__license__ = "MIT" | |
from dataclasses import dataclass, field | |
from datetime import timezone, timedelta, tzinfo, datetime | |
from math import copysign | |
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.