I am getting an error called 'list' object has no attribute 'setProperty'
I am making a ai in python this is my code THE ISSUE IS WITH THE LAST 2 LINES CAN ANYONE PLEASE FIX IT
import datetime
import random
import sys
import webbrowser
import googlesearch
import pyttsx3
import speech_recognition as sr
from playsound import playsound
print("")
voice = pyttsx3.init()
voice = voice.getProperty('voices')
voice.setProperty('voice', voices[0].id)