You pronounce the article "the" as /ði/ in front of words that start with a vowel-sound: the apple, the evening, the eye, the example, the oak, the ears, the arm, the idea, the egg.
You pronounce the article "the" as /ðə/ in front of words that start with a consonant-sound: the car, the cat, the sword, the man, the girl, the table, the kitchen, the book, the door.
Note: the indefinite articles "a" or "an" follow the same rules.
Du sprichst den Artikel "the" als /ði/ aus, wenn er vor Wörtern steht, die mit einem Vokallaut beginnen: the apple, the evening, the eye, the example, the oak, the ears, the arm, the idea, the egg.
Du sprichst den Artikel "the" als /ðə/ aus, wenn er vor Wörtern steht, die mit einem Konsonantenlaut beginnen: the car, the cat, the sword, the man, the girl, the table, the kitchen, the book, the door.
Beachte: die unbestimmten Artikel "a" oder "an" unterliegen der selben Regel.