A physics-informed neural network (PINN) is proposed for numerical simulation of forward and inverse problems associated with internal sound field in frequency domain. Unlike data-driven neural network, Helmholtz equation of a acoustic problem and corresponding boundary conditions are embedded in the neural network. The developed neural network reflects the distribution law of training data samples, and follows the physical law described by partial differential equations as well. For frequency acoustic problem with complex numbers, two types of networks are established. Verification and comparison are performed. Tedious numerical calculation processes such as meshing and numerical integration are not needed, and irregular domain and non-uniformly distributed nodes are freely addressed. Numerical examples, including the forward and inverse problems in two-dimensional and three-dimensional complex geometric structures, are provided to investigate effectiveness of the method. It shows that the PINN has good accuracy, convergence and robustness.