This is basically just an elaboration - in particular, it just gives a canonical procedure for what Ben Wieland describes using a two-sided bar construction, and it's standard in the field.

Let $A$ be an $A_\infty$-operad (a non-Σ operad) acting on a space $X$.

First, take singular complexes: $Sing(A)$ then becomes an operad in simplicial sets acting on $Sing(X)$. Taking geometric realization, we get a map of operads $B = |Sing(A)| \to A$, making $X$ a $B$-algebra, and a map $Y = |Sing(X)| \to X$ which is a weak equivalence and a map of $B$-algebras. So without loss of generality we may assume that both our operad and our space are CW; if $X$ was a CW-complex in the first place then $Y$ is actually homotopy eqivalent to $X$.

There is a natural map from the operad $B \to Assoc$ to the associative operad. Each of these operads has an associated monad, taking spaces to the free algebras on that space. I'll abuse notation and use the same letter for the associated monad, so
$$
B(Z) = \coprod_{n \geq 0} B(n) \times Z^n.
$$
For any CW-complex $Z$, the natural map $B(Z) \to Assoc(Z)$ is a homotopy equivalence.

We then hit this with a two-sided bar construction. We have a simplicial space
$$
Bar(B,B,Y) = \{B(Y) \leftleftarrows B(B(Y)) \cdots \}
$$
whose structure maps come from the monad's structure maps, and a natural augmentation $|Bar(B,B,Y)| \to Y$ which is a homotopy equivalence of $B$-algebras for formal reasons (the simplicial space has an "extra degeneracy").

We have another simplicial space
$$
Bar(Assoc,B,Y) = \{Assoc(Y) \leftleftarrows Assoc(B(Y)) \cdots\}
$$
and a natural map of simplicial spaces $Bar(B,B,Y) \to Bar(Assoc,B,Y)$ which is a levelwise homotopy equivalence. Taking geometric realization, we get a map $|Bar(B,B,Y)| \to |Bar(Assoc,B,Y)|$ which is a homotopy equivalence and a map of $B$-algebras, where the latter is actually an algebra over the associative operad.

Net result, we get a diagram of algebras over the $A_\infty$-operad $B$ as follows:
$$
|Bar(Assoc,B,Y)| \leftarrow |Bar(B,B,Y)| \to Y \to X
$$
Here the left two arrows are homotopy equivalences, the rightmost arrow is a weak equivalence, and the leftmost object is actually strictly associative rather than just an $A_\infty$-algebra.