For $p \in \mathbb{R}$, let $(a_n)_{n \ge 1}$ be the sequence defined by
\[ a_n=\frac{1}{n^p} \int_0^n |\sin( \pi x)|^x \mathrm dx. \]
Determine all possible values of $p$ for which the series $\sum_{n=1}^\infty a_n$ converges.

1. We start with the given sequence:
   \[
   a_n = \frac{1}{n^p} \int_0^n |\sin(\pi x)|^x \, dx.
   \]

2. According to the reference, it has been shown that:
   \[
   \int_0^n |\sin(\pi x)|^x \, dx \sim 2\sqrt{\frac{2n}{\pi}}, \quad \text{as} \quad n \to \infty.
   \]
   This means that for large \( n \), the integral behaves like \( 2\sqrt{\frac{2n}{\pi}} \).

3. Substituting this asymptotic behavior into the expression for \( a_n \), we get:
   \[
   a_n \sim \frac{1}{n^p} \cdot 2\sqrt{\frac{2n}{\pi}} = \frac{2\sqrt{2}}{\sqrt{\pi}} \cdot \frac{1}{n^p} \cdot \sqrt{n} = \frac{2\sqrt{2}}{\sqrt{\pi}} \cdot \frac{1}{n^{p-\frac{1}{2}}}.
   \]

4. To determine the convergence of the series \( \sum_{n=1}^\infty a_n \), we use the limit comparison test. We compare \( a_n \) with the series \( \sum_{n=1}^\infty \frac{1}{n^{p-\frac{1}{2}}} \).

5. The series \( \sum_{n=1}^\infty \frac{1}{n^{p-\frac{1}{2}}} \) converges if and only if the exponent \( p - \frac{1}{2} > 1 \). This is a result of the p-series test, which states that \( \sum_{n=1}^\infty \frac{1}{n^q} \) converges if and only if \( q > 1 \).

6. Solving the inequality \( p - \frac{1}{2} > 1 \):
   \[
   p - \frac{1}{2} > 1 \implies p > 1 + \frac{1}{2} \implies p > \frac{3}{2}.
   \]

Conclusion:
The series \( \sum_{n=1}^\infty a_n \) converges if and only if \( p > \frac{3}{2} \).

The final answer is \( \boxed{ p > \frac{3}{2} } \).