有没有人挑战一下,让 o1 生成一个能调用微软 Edge TTS WebSocket API 将语音转文字的函数,要能用。
我测试失败了,不过已经很接近了,比 Claude 生成的效果好很多。当然我提示词也很简单:
Write a TypeScript function to convert text to audio file, use Micrsoft Edge API, sends SSML-formatted text and receives audio data.
endpoint: wss://speech.platform.bing.com/consumer/speech/synthesize/readaloud/edge/v1?TrustedClientToken=6A5AA1D4EAFF4E9FB37E23D68491D6F4
voice: zh-CN-XiaoxiaoNeural
write an example to call the function and save the audio as a mp3 file, put everything in a js file and can be run by nodejs
点击图片查看原图