Let \( g_i : \left[\frac{\pi}{8}, \frac{3\pi}{8}\right] \to \mathbb{R}, \, i=1,2, \) and \( f : \left[\frac{\pi}{8}, \frac{3\pi}{8}\right] \to \mathbb{R} \) be functions such that \( g_1(x) = 1, \, g_2(x) = |4x - \pi| \) and \( f(x) = \sin^2 x \), for all \( x \in \left[\frac{\pi}{8}, \frac{3\pi}{8}\right] \).
Define \( S_i = \int\limits_\dfrac{\pi}{8}^\dfrac{3\pi}{8} f(x) \cdot g_i(x) \, dx, \quad i=1,2 \).
The value of \( \frac{16 S_1}{\pi} \) is ________.