I'm trying to use tortoise-tts AI text to voice on Colaboratory, but keep getting the following error message when I try to upload my audio samples - artificial-intelligence

I'm using the AI text to speech tool called Tortoise:
https://colab.research.google.com/drive/1NxiY3zHN4Nd8J3YAqFsbYaOB71IiLE04?usp=sharing#scrollTo=bt_aoxONjfL2
But when I get to the uploading my audio sample stage I get this error message:
enter image description here
I've tried changing the names and lengths of of the audio files, thought the lengths are already within the asked for range.
Any tips?`

Related

How to convert file size correctly in SPFx

I`ve have a next problem.
I get from sharepoint perfomance an item object with some information about list item, apart from other fields item object has two fields with information about file size
For example:
File_x0020_Size: "1152"
SMTotalSize: "112293"
If i look into sharepoint perfomance i will see next field display (File size 1.13KB)
enter image description here
I dont understand how to convert file size from File_x0020_Size or SMTotalSize in the way that i got 1.13KB as into sharepoint perfomance.
I try to find out my case in other articles dedicated 'how to get file size in SPFx', but all i could find it is information about povershell
enter image description here
How to Get the File Size in SharePoint Online
But i use React.js and pnp.js

How do I pull a random gif from tenor in discord.py?

I'm doing a discord bot using discord.py and one of the functions I want to add is on a command !gif it sends a random gif from tenor. Is it possible to do that? So basically what I need is an explanation as to how to fetch GIFs from tenor.
You would need to query Tenors random gif api:
https://tenor.com/gifapi/documentation#endpoints-random
This requires you to provide a search term and will return a randomised list of gif for that keyword.
You can then respond to the command with either a link to the gif or the gif itself as a file.

How to single out an object in a bytearray obtained from a pdf?

Let's say I have a pdf with 10 balloon callouts. Now I have converted that pdf into a bytearray using the following code.
file = open('cc.txt','rb')
for line in open("123.pdf", 'rb').readlines():
file.write(line)
file.close()
Now, how can I identify the bytes that denote the balloon callouts?
I tried googling, but wasn't able to find any answers. Help me out guys.
You can't because this is not how PDF files are structured internally (they are not line based). You need a PDF parsing library to get the objects corresponding to the balloon call-outs.

Error 400 when Creating Custom Classifier in Watson Visual Recognition

I am currently facing a problem to create my own classfiers. I already tried to build a NodeJS application and also create it using IBM's demo, but everytime I submit my ZIP folders to be created, I recieve the following error message:
Cannot execute learning task. : need at least 2 _positive_examples fields, (or 1 _positive_examples and 1 negative_examples field) to train a classifier. null specified.
However, when I tried to use the IBM Demo webapp using the .zip they provide (husky, beagle and cats.zip files) the classifier is successfully createdi
I have currently 2 zips (1 positive and 1 negative) each containing 50 files named from 1.jpg to 50.jpg.
Have any of you guys ever gone through this issue and found a way to handle it?
Thanks for the attention.
Best regards,
Enrico Bergamo
As per the discussion on the DeveloperWorks Forum ( https://developer.ibm.com/answers/questions/377690/error-400-when-trying-to-create-a-custom-classifie/ ), Your zip files are not really zips. It looks like all you have done is name your folder positive.zip.
Right click on each of the folders in turn and select create zip or compress as zip.
What this message indicates is that the service is not receiving any POST fields that end in '_positive_examples' which is necessary for a training request. So double check your form field name parameters.

How to upload multiple files on single statement in selenium?

I am not getting any warning or error message while executing the program.
wd.findElement(By.xpath("XPATH")).sendKeys("ABC.jpg","XYZ.jpg");
But no file is uploading.
wd.findElement(By.xpath("XPATH")).sendKeys("can we make CTRL+A operation" );
Thanks in advance.
I think you may be going about this while "file upload in Selenium" thing wrong, so that's what I'm going to address.
This article by SauceLabs covers the basic steps to handle a file upload through Selenium in both Java and Ruby. Assuming you're using Java, there are a few steps you'd need:
Set the FileDetector method for your WebDriver
Get a WebElement pointing to a valid HTML input tag of type file
Have Selenium type in the file's path (Not sure if this requires absolute paths, but it's probably a good idea)
Submit the form
The following code listing demonstrates how to perform each of these steps:
wd.setFileDetector(new LocalFileDetector());
// point your webdriver to the page containing the upload form.
WebElement upload = wd.findElement(By.xpath("XPATH")); // TODO replace xpath!
upload.sendKeys("/path/to/ABC.jpg");
upload.submit(); // NOTE: Submits the form *containing* the upload field!
Because you've set the file detection method to LocalFileDetection, Selenium will be able to find the appropriate file. If this is not set, then Selenium defaults to the UselessFileDetection implementation, which fails every time to avoid accidental file uploads.
Caveat: If you're using a Javascript or Flash-based multiple file upload system, then this probably won't work, since those typically bypass the original input field or handle upload independently from the form's submission.
You are not getting an error because sendKeys() accepts an array of CharSequence objects. and you are conforming to that method contract
But no file is uploading
That is because the way your code is written now, will actually send the text: ABC.jpgXYZ.jpg.

Resources