Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add fast_api and example #214

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

caiquecober
Copy link

add fast api

Copy link
Owner

@souzatharsis souzatharsis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excellent and useful contribution, thanks!

@caiquecober
Copy link
Author

Obrigado,

Ainda não consegui fazer o requirements atualizar direito com o poetry; ainda estou tentando fazer esta parte e ajustar os testes.

Ademais, uma dúvida: os mp4 que você está gerando para os podcasts são fora da biblioteca? Estava querendo mexer direto com o vídeo para retornar na API.

@souzatharsis
Copy link
Owner

Thanks @caiquecober

  1. It's important pytests are added covering this new functionality
  2. You can generate requirements.txt from poetry like this:
poetry export -f requirements.txt --output requirements.txt --without-hashes
  1. I use the below bash script to convert mp3 to mp4. We should make it available in the repo somewhere/how
# Assumes input.mp3 and outputs output.mp4
ffmpeg -i input.mp3 -filter_complex \
"color=c=black:s=320x240[bg]; \
[0:a]aformat=channel_layouts=mono,\
showwaves=s=320x220:mode=line:rate=25:colors=cyan|magenta[wave]; \
[bg][wave]overlay=0:30[waveform]; \
[waveform]drawtext=fontfile=/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf: \
text='podcastfy.ai':fontcolor=white:fontsize=20:box=1:[email protected]:boxborderw=5: \
x=(w-text_w)/2:y=h-th-10[out]" \
-map "[out]" -map 0:a -c:v libx264 -c:a aac -shortest output.mp4

This for working on this PR!

@caiquecober
Copy link
Author

Yeah, I started to write some tests as well. It was on the second one, my first test, so I was trying to understand what I needed to write as well; I'll continue trying.

First, I'll get this version running; then, I'll improve it later, focusing on the basics.

@souzatharsis
Copy link
Owner

souzatharsis commented Dec 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants