I can't add AVSPEECHSynthesisMarker in AVSpeechSynthesizer

Hello!

I have been facing great difficulty for days now. Pretty frustrating for me.

Simply, I can't add any array bookmarks when I use AVSpeechSynthesizer speech marker with AVSpeechSynthesisMarker but i'm not helping this in AVSpeechSynthesizer .

Here is a simple code, I removed the utterance part:

let synt = AVSpeechSynthesizer() synt.write(expression, toBufferCallback: {buffer in}, toMarkerCallback: {marks in mark.append(AVSpeechSynthesisMarker(bookmarkName: "Test1", atByteSampleOffset: 4)) }

Note that this simple code what I want is to add a AVSpeechSynthesisMarker no AVSpeechSynthesizer . XCode 15 beta is saying that brands It is immutable for being the type 'to leave' .

But then how am I going to add markers in AVSpeechSynthesizer ?

Please help me.

Thanks!

I can't add AVSPEECHSynthesisMarker in AVSpeechSynthesizer
 
 
Q