The equation to use that relates tension in the string to velocity of propagation is:

You can take the time derivative of your y(x,t) formula to find v as a functioj of x and t. However, I must say your equation is a bit confusing. What you wrote is this:

Do you really mean to suggest that pi is a function of t?