Which period of slavery? Just saying “slavery” is pretty vague. Thus the answers you get will be equally so.
In some areas people were enslaved that spoke the same language of their captors. In some cases there would be slaves that had been captive long enough to pick up the language of their captors. In other cases, like the American South slavery was such an ingrained institution that the native languages of the African slaves eventually became largely lost to their descendants because of active attempt by slave owners to keep their slaves as poorly educated as possible.