Skip to content

Repository files navigation

Tang Poems · 唐诗三百首

A native iPhone & iPad app for reading, learning and reciting classic Chinese Tang dynasty poetry. Each poem shows the original Chinese characters with Hanyu Pinyin above every character, can be read aloud in a Chinese male voice (fully offline), and comes with a short background/appreciation and a poet biography.

📲 Now available on the App StoreTang Poems · 唐诗三百首

Download on the App Store

Tang Poems — poem detail with pinyin and read-aloud

Tang Poems — iPad master–detail

Features

  • 📖 Curated Tang poems — ~40 of the most famous poems from《唐诗三百首》by Li Bai, Du Fu, Wang Wei, Bai Juyi and more.
  • 🔤 Per-character Hanyu Pinyin — tone-marked pinyin rendered above each Chinese character for easy reading and pronunciation.
  • 🔊 Offline read-aloud (Chinese male voice) — tap 朗读 to hear the whole poem narrated via the built-in AVSpeechSynthesizer (zh-CN), no network required.
  • 📝 Background & poet bio — every poem includes a concise 诗词赏析 (appreciation) and 诗人简介 (poet biography).
  • 🔎 Search — by poem title, poet name, keyword, or pinyin (tone-insensitive).
  • 🎚️ Filter by poet — quickly browse all poems from a single poet.
  • 🍏 Universal & adaptiveNavigationSplitView master–detail on iPad, navigation stack on iPhone.
  • 🤍 Clean white theme — a calm, classic reading experience with a cinnabar-red (印章红) accent.

Tech Stack

Area Choice
Language Swift 5
UI SwiftUI (iOS 17+)
Speech AVSpeechSynthesizer (offline, zh-CN male voice)
Layout NavigationSplitView, custom FlowLayout for pinyin alignment
Data Bundled poems.json (generated with pypinyin)
Project gen XcodeGen (project.yml)

Project Structure

TangPoems/
  TangPoemsApp.swift     # App entry, white nav/tab appearance
  MainTabView.swift      # Tabs: 唐诗 / 反馈 / 关于
  PoemsView.swift        # Browse + search (NavigationSplitView)
  PoemDetailView.swift   # Characters + pinyin, read-aloud, background, poet bio
  FlowLayout.swift       # Wrapping layout for per-character pinyin columns
  TTSManager.swift       # Offline Chinese male-voice TTS
  PoemStore.swift        # Loads poems.json, search/filter
  Models.swift           # Poem / line / char-pinyin models
  Theme.swift            # Brand tokens (white theme, cinnabar accent)
  FeedbackView.swift     # WhatsApp feedback form
  AboutView.swift        # App / developer / data-source / version
  Resources/poems.json   # Curated poems with pinyin, background, poet bios
data/generate_poems.py   # Regenerates poems.json (pypinyin)
project.yml              # XcodeGen spec

Build & Run

brew install xcodegen          # if not installed
xcodegen generate              # produces TangPoems.xcodeproj
open TangPoems.xcodeproj        # build & run on an iPhone or iPad simulator

To regenerate the poem data (requires pip install pypinyin):

cd data && python3 generate_poems.py

Data Source

Poem texts are classic public-domain works, referenced from 维基文库 ·《唐詩三百首》.

Acknowledgements

Developed by Tertiary Infotech Academy Pte Ltdtertiaryinfotech.com.

About

Native iPhone & iPad app for reading Tang dynasty Chinese poetry — per-character Hanyu Pinyin, offline Chinese male-voice read-aloud, poem backgrounds and poet bios, search by title/poet/keyword. SwiftUI.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages