How to provide voice synthesis on my website? - python

I have a python program which can take as an input a text file and some parameters, and give as output a file mp3. I would like to let people try the system on my website, for small sentences.
I thought I could put the python program on a cloud server and create a API with Flask-Restful, and then call this API with my website which is made with Django Framework. I can't afford a GPU server, so it will take a few seconds/minutes to generate the mp3 file. I can't make a POST request that long, can I?
The thing is, I don't know if this is an appropriate method, is there an easier way to do this ? I just want to install my tts system on a web server, and be able to call it from my website. I didn't found any documentation or tutorial that helped me...
Tell me if my problem is not clear enough,
Thank you for your help

Related

How can I transfer Data twice a day from an FTP Server to Python and then to a Website

I have climate data that is sent to a ftp server and I want to make it visable on our website. New data comes in twice a day. Beforehand the data needs to be prepared and I also want to visualize it preferably with python. I want to learn the best way to do this but have no idea where to start. I am not looking for a definite solution since I know this is a big project. I just need some suggestions on how to start or which tools might help me.
Like you said this is a project itself but I can give you some directions.
I would use an ftp library for handling pulling data to python for processing.
Check https://docs.python.org/3/library/ftplib.html
For visualization that would really depend on data you have. But generally, after processing the data, save it to a file(or db) and when backend recieves a request for that data, backend reads this file(or db) and you visualize it with javascript. Something like d3js would work.
Also you might use a tool for visualization but I don't know any(Power BI???).

I whant to run a code online that can be used by everyone with a link

I created a code that uses the pickle library so it can save some data on some files.
I want this code to be accessible to multiple persons that could type commands into the code that modify these files. But to do that, I need to run my python online to make it public to everyone that has a link. I tried the site repl.it that seemed good for this utilization but the problem is that when others persons try to use the code, the modifications are not saved and i think they have to create an account for repl.it to save modifications...
Do you have better solutions to do this ?
Thanks

Automated OCR program or off-the-shelf tool to scan PDFs/images and output into excel documents

I'm new to programming and recently started getting into Python a lot more seriously. However, I've done some projects that required programming in my company, so I have some background on how it works (or how to scour the internet! lol).
Recently however, we have had a client that sends us invoices in PDF formats and we would like to automate all the invoices to compile into one .csv file.
I've been picking up a few OCR codes (I ran my first image-to-text output recently), however I don't think I'm 100% capable of creating such automation yet since I'm still very fresh in programming. It would require at least a few weeks, and I'm not sure if it's worth it if we could just ask the client to set up a more accurate excel spreadsheet to send over every time.
That's why I'm turning to an already available OCR tool. I recently found this gem: https://www.pdftoexcel.com/ however it is a very manual process and not as automated as we could like. If there is a way to program a script to upload an available PDF file from a certain folder in order to upload it to the website and export it into an Excel file every time we receive an invoice, would it be possible to share?
It would also be a big plus if there would be a way to upload a batch of invoices and identify different charges, providing a summary across the scanned invoices, particularly in the categories
I hope what I'm asking for makes sense. Let me know if you'd require more clarification.
Cheers
There's lots of stuff available for Python, if you have a quick search on Google or StackOverflow. I believe I used Tesseract OCR in the past.
My experience is that you will get serviceable OCR with some of the popular Python libraries, but the excellent stuff will come with a price tag.
Try some tests with your PDF invoices, but if you are getting even slightly questionable results, you may have to consider more expensive alternatives (or even standalone machinery!).
If the client is sending you clear, nicely formatted PDFs with a good font, I don't see why free Python libraries wouldn't be sufficient.

django/python: How to convert pptx/docx formats to PDF using python?

First of all, I agree that this might sound like a question which has already been asked many times in the past. However I couldn't find any answer that was relevant to me in the similar questions so I'll try to be more specific.
I would need to transform PPTX/DOCX files into PDF using Python but I don't have any experience in file format conversion. I have been looking in many places/forums/websites, read a lot of documentation and came across some useful libraries (python-pptx and pyPdf mainly), but I still don't know where to start.
When looking on the Internet, I can see many websites that offer file format conversions as a paying service, even with advanced API's: submit a file via POST and get the transformed PDF file in return. This could work for me, but I am really interested in writing myself the code that does the conversion work from OOXML to PDF.
How would you start doing this? Or is it just impossible on my own?
Thanks for your help!
After some research and with the help of python-pptx's creator, I was able to write to the PowerPoint COM interface using a Virtual Machine.
In case someone reads this thread, this is how I managed to get this done:
- Setup a VM with Microsoft Windows/Office installed on it ;
- Install Python, Django and win32com libraries on the VM.
The files are sent locally from the original Django project to the virtual machine (which are on the same network) through a simple POST request. The file is converted on the VM using win32com.client (which is just a simple call to the win32com.client library) and then sent back as a response to the original Django view, which in turn processes the response.
Note: it took me some time to realize I needed to use the #csrf_exempt decorator for this setup to work.

How to get download progress info from I.D.Manager to python?

im working a project lately to get download progress info remotely when im away.
i googled a bit but i couldnt find any useful info. on this issue
im using Internet Download Manager.
please help :/ i appreciate any suggestions
im thinking about making software with python but Also C is Ok. if there is a solution
I dont know exactly how to do it but you can get IDM download progress( such as Transfer rate, TimeLeft... ) by reading the values of the ListView of Internet Download Manager windows (they call it "hook"? )
i just found idm has log file for every download in its temporary folder im trying to parse information from log file i dunno if it is possible sync.ly get info..but i'll try

Categories