souzatharsis / podcastfy

An Open Source Python alternative to NotebookLM's podcast feature: Transforming Multimodal Content into Captivating Multilingual Audio Conversations with GenAI
https://www.podcastfy.ai
Apache License 2.0
1.77k stars 200 forks source link

How to get Elevenlabs to work? #199

Open frankmeeuwsen opened 4 days ago

frankmeeuwsen commented 4 days ago

Thanks for this excellent package. I use the downloaded package, not the pip install version. I want to try to use custom voices from Elevenlabs but somehow I can't get it to work. I have a custom.yaml with tts_model: "elevenlabs" but when I run this I get an error

File "/Users/Documents/podcastfy/podcastfy/client.py", line 342, in generate_podcast tts_model = conversation_config.get("default_tts_model", "openai") ^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'get'

I am not sure how to proceed from here... an example with custom yaml to use Elevenlabs in another language would be appreciated.

souzatharsis commented 4 days ago

Could you please share your custom yaml file?

On Fri, Nov 29, 2024, 12:29 PM Frank Meeuwsen @.***> wrote:

Thanks for this excellent package. I use the downloaded package, not the pip install version. I want to try to use custom voices from Elevenlabs but somehow I can't get it to work. I have a custom.yaml with tts_model: "elevenlabs" but when I run this I get an error

File "/Users/Documents/podcastfy/podcastfy/client.py", line 342, in generate_podcast tts_model = conversation_config.get("default_tts_model", "openai") ^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'str' object has no attribute 'get'

I am not sure how to proceed from here... an example with custom yaml to use Elevenlabs in another language would be appreciated.

— Reply to this email directly, view it on GitHub https://github.com/souzatharsis/podcastfy/issues/199, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTMY3PTYRJWUSACNSOODAT2DCB4XAVCNFSM6AAAAABSXKSPJWVHI2DSMVQWIX3LMV43ASLTON2WKOZSG4YDKNBUGAYDGMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

frankmeeuwsen commented 4 days ago

Since I can't upload it, here it is copy-pasted. Since I commented, I got it to work somehow on the commandline, but it still falls back to the openAI voices from what I can hear.

Thanks for your help!

word_count: 400
conversation_style: 
  - "Technical expertise"
  - "Enthusiastic"
podcast_name: "Jobs overview"
roles_person1: "main explainer"
roles_person2: "domain expert"
output_language: "Dutch"
podcast_tagline: "Work on your own careerpath"
engagement_techniques: 
  - "technical know-how"
  - "vivid imagery"
  - "audience prompts"
ending_message: "See our website for more information!"
creativity: 0.7
model: "eleven_multilingual_v2"
default_voices:
  - question: "Frank"
  - answer: "Melanie"
souzatharsis commented 4 days ago

Thanks for sharing.

You need to pass voice names that speak your target language in config. Additionally, you need to pass tts_model = 'elevenlabs' when calling generate podcast.

https://github.com/souzatharsis/podcastfy/blob/main/usage/how-to.md#how-to-use-your-own-voice-in-audio-podcasts

Please let me know if you still have issues and I can generate a full working example when I have time on Monday.

Thanks!

On Sat, Nov 30, 2024, 4:12 AM Frank Meeuwsen @.***> wrote:

Since I can't upload it, here it is copy-pasted. Thanks for your help!

word_count: 400conversation_style:

  • "Technical expertise"
  • "Enthusiastic"podcast_name: "Jobs overview"roles_person1: "main explainer"roles_person2: "domain expert"output_language: "Dutch"podcast_tagline: "Work on your own careerpath"engagement_techniques:
  • "technical know-how"
  • "vivid imagery"
  • "audience prompts"ending_message: "See our website for more information!"creativity: 0.7model: "eleven_multilingual_v2"default_voices:
  • question: "Frank"
  • answer: "Melanie"

— Reply to this email directly, view it on GitHub https://github.com/souzatharsis/podcastfy/issues/199#issuecomment-2508866867, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTMY3IXUENPTWYG3XZIZK32DFQOXAVCNFSM6AAAAABSXKSPJWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBYHA3DMOBWG4 . You are receiving this because you commented.Message ID: @.***>

frankmeeuwsen commented 4 days ago

The voices in the yaml are Dutch voices (my own and one from the library) so that should work. I tried this on the commandline: python -m podcastfy.client --tts-model elevenlabs --conversation-config ~/Downloads/podcastify/custom.yaml --transcript ~/Downloads/podcastify/data/transcripts/transcript_8e24eb33c7a0416d83759bc3b27d6636.txt

And when I changed the names of the voices in podcastfy/conversation_config.yaml to the Dutch ones it worked! But I'd rather override those values in my own config.yaml. Is this possible?