Closed
Description
I am encountering issues while attempting to use the SDK for Text-to-Speech (TTS). Despite following the provided documentation and examples, I am unable to successfully generate speech from text.
Steps to Reproduce:
-
Setup Environment:
- Operating System: Ubuntu 20.04
- SDK Version: 2024.10.22
- Programming Language: Python 3.10.15
-
Code Snippet:
from fish_audio_sdk import Session, TTSRequest
def main():
f = None
if result_path is not None:
f = open(result_path, "wb")
for chunk in self.session.tts(
TTSRequest(text=text, reference_id=voice_id, format=audio_format)
):
if f is not None:
f.write(chunk)
f.flush()
elif result_array is not None:
result_array.extend(chunk)
if __name__ == "__main__":
main()
- Expected Behavior:
- The SDK should successfully synthesize the provided text into speech and return an audio stream.
- Actual Behavior:
- raise Exception: TypeError('Type is not msgpack serializable: TTSRequest')
Metadata
Metadata
Assignees
Labels
No labels