In this paper, an effective numerical method for the Dirichlet problem connected with the Helmholtz equation is proposed. We choose a single-layer potential approach to obtain the boundary integral equation with the density function, and then we deal with the weakly singular kernel of the integral equation via singular value decomposition and the Nystrom method. The direct problem with noisy data is solved using the Tikhonov regularization method, which is used to filter out the errors in the boundary condition data, although the problems under investigation are well-posed. Finally, a few examples are provided to demonstrate the effectiveness of the proposed method, including piecewise boundary curves with corners.