Slovenian is spoken in Piran. But don't worry, most locals also speak English, especially in restaurants, hotels and other tourist establishments. Some also speak German or Italian.