A finite volume method for solving the monodomain and bidomain models for the electrical activity of myocardial tissue is presented. These models consist of a parabolic PDE and a system of a parabolic and an elliptic PDE, respectively, for certain electric potentials, coupled to an ODE for the gating variable. The existence and uniqueness of the approximate solution is proved, and it is also shown that the scheme converges to the corresponding weak solutions for the monodomain model, and for the bidomain model when considering diagonal conductivity tensors. Numerical examples in two and three space dimensions are provided, indicating experimental rates of convergence slightly above first order for both models.