Voice translator in python
I have used this code- https://github.com/Alekh-sinha/google_translator/blob/master/text_to_speech_3.py for doing voice translation.It basically converts speech to text then translate that text and then it converts translated text back to the voice. I wanted to use this for videos running on my PC so I enabled stereo mix in my PC and it worked. But when I applied same principal to skype call, it is not working. I will be very grateful of somebody will help me in this
See also questions close to this topic
Trying to engineer new columns using a for loop to create column names and then populate new columns with data from the dataset
I am working with the olympic medal dataset which can be found here. The data shows aggregated medals won by each country for both summer and winter olympics.
I am trying to create new columns to show the number of gold, silver and bronze medals won per games appearance for summer games, winter games, and combined. I have tried creating a list of medals and seasons medals per game, creating a new column in the dataframe for each combination and thought I could divide the original columns (eg summer gold, summer silver ...) by the total for games attended for given season (eg summer gold / summer games attended).
However, when I tried the code below I got KeyError: ('%s games attended', 'Summer'). Any suggestion for how to accomplish the new feature I'm trying to create would be appreciated
import pandas as pd import numpy as np import matplotlib.pyplot as plt data = pd.read_csv('/Users/xx/Downloads/olympics.txt', header = 1) data.columns = ['Country', 'Summer games attended', 'Summer gold', 'Summer silver','Summer bronze','Summer total', 'Winiter games attended','Winter gold', 'Winter silver','Winter bronze','Winter total', 'Combined games attended','Combined gold', 'Combined silver','Combined bronze','Combined total'] data['Country'] = data['Country'].str.split("\[", expand=True) data.drop(146, axis = 0, inplace = True) medals = ['gold', 'silver', 'bronze'] seasons = ['Summer', 'Winter', 'Combined'] for col in data.columns: for medal in medals: if medal in col: for season in seasons: if season in col: n = season + ' ' + medal + ' per games' data[n] = [i for i in col / 2]
How to implement the iterative way to change the filename reading and how to combine result into single excel file
I am new to python. Have a task that have to find some of the following for all the excel files(1.xlsx-350.xlsx) around 350 excel files, which contained in single folder(Videos). and written following code it works fine but it is time consuming, manually have to change file name every iteration. even in the end of the process, I have to combine all 350 excel file operated data into single excel file. But in my code it overwrite each and every iteration. please help me to resolve this problem.
data12 = pd.read_excel (r'C:\Users\Videos\1.xlsx') gxt = data12.iloc [:,0] gyan = data12.iloc [:,1] int= gyan.iloc[98:197] comp= gyan.iloc[197:252] seg= gyan.iloc[252:319] A= max(int) B= max(comp) C= min(comp) D= max(seg) s = pd.Series([A, B, C, D]) frame_data= [gyan, comp, seg, stat] result = pd.concat(frame_data) result.to_excel("output.xlsx", sheet_name='modify_data', index=False)
thank you for helping.
Tkinter class and methods
I have this tkinter codes, working fine but I want to put them into a class with methods for each process. I am very new to Python, how can I do this?
You don't have to do all, just the class and two methods will be fine and I can learn to replicate the rest.
root= tk.Tk() canvas1 = tk.Canvas(root, width = 400, height = 400, relief = 'raised') canvas1.pack() label1 = tk.Label(root, text='EDA') label1.config(font=('helvetica', 12)) canvas1.create_window(200, 25, window=label1) label2 = tk.Label(root, text='Number of Clusters:') label2.config(font=('helvetica', 8)) canvas1.create_window(200, 120, window=label2) entry1 = tk.Entry (root) canvas1.create_window(200, 140, window=entry1) browseButtonExcel = tk.Button(text=" Import Excel File (CSV) ", command=App.getExcel, bg='green', fg='white', font=('helvetica', 10, 'bold')) canvas1.create_window(200, 70, window=browseButtonExcel) processButton = tk.Button(text=' k-Means Clustering', command=cluster, bg='brown', fg='white', font=('helvetica', 10, 'bold')) canvas1.create_window(200, 170, window=processButton) root.mainloop()
bq extract - BigQuery error in extract operation: An internal error occurred and the request could not be completed
I am trying to export a table from BigQuery to google storage using the following command within the console:
bq --location=<hidden> extract --destination_format CSV --compression GZIP --field_delimiter "|" --print_header=true <project>:<dataset>.<table> gs://<airflow_bucket>/data/zip/20200706_<hidden_name>.gzip
I get the following error :
BigQuery error in extract operation: An internal error occurred and the request could not be completed.
Here is some information about the said table
Table ID <HIDDEN> Table size 6,18 GB Number of rows 25 854 282 Created 18.06.2020, 15:26:10 Table expiration Never Last modified 14.07.2020, 17:35:25 Data location EU
What I'm trying to do here, is extract this table into google storage. Since the table is > 1 Gb, then it gets fragmented... I want to assemble all those fragments into one archive, into a google cloud storage bucket.
What is happening here? How do I fix this?
Note: I've hidden the actual names and locations of the table & other information with the mention
Google Cloud Storage Transfer Sink Prefix
I've scanned the Storage Transfer docs, but I'm not seeing an example of this scenario. For reference, I'm using this script - https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/storage/transfer_service/nearline_request.py
Is there a way to set a prefix for files being transferred from the source bucket to the sink bucket?
For example, if I have this file in the source bucket:
I want to add a prefix to it so that it looks like this in the sink bucket:
As far as I can tell, the sink bucket argument only accepts a bucket's name. I'm not seeing an option for something like this in the
transferSpecdocs either. Any help would be most appreciated.
How to Terminate Google cloud build job when SonarQube 7.8 quality gate check fails
I am using below code in
cloudbuild.yamlfile. But it is giving syntax error and failing. Please suggest.
steps: #build jar file - name: maven:3.6.1-jdk-8 entrypoint : mvn args: ['package', '-q'] dir: 'dataflows/generic/pubsub-sftp/src' id: 'build-jar' #static code analysis by sonarqube - name: maven:3.6.1-jdk-8 entrypoint: bash args: - -c - | unset MAVEN_CONFIG \ && echo "188.8.131.52 sonarqube.ct.blue.cdtapps.com" > /etc/hosts \ && mvn sonar:sonar -q -Dsonar.login=5531b1a2d571c0482a3d89f605830e08ccf5f850 \ '-Dsonar.projectKey=odp.df.pubsub-sftp' \ '-Dsonar.projectName=ODP-DF-PUBSUB-SFTP' \ '-Dsonar.host.url=https://sonarqube.ct.blue.cdtapps.com' \ '-Dsonar.qualitygate.wait=true' \ allow_failure: true dir: 'dataflows/generic/pubsub-sftp/src' id: 'sonarqube-analysis' #Move jar to artifactory - name: gcr.io/cloud-builders/gcloud entrypoint: 'bash' args: ['-c', 'curl -u $$ARTIFACTORY_CREDENTIALS -X PUT "https://artifactory.build.ingka.ikea.com/artifactory/$_ARTIFACTORY_REPO/$_PACKAGE_NAME/pubsub-sftp-$BRANCH_NAME.jar" -T pipeline-bundled-0.1.jar'] dir: 'dataflows/generic/pubsub-sftp/src/pipeline/target' secretEnv: ['ARTIFACTORY_CREDENTIALS']
Simple Speech to Text Using Watson/Google Speech API with direct audio stream from Mic?
I'm a student working on a project that incorporates speech to text, where the user would speak into their mic and I would be able to send the user a transcription of their response / do some analysis on what they said, and store the audio in a backend database. I would be using React frontend and Rails backend.
I've looked at several docs and followed some of the tutorials avaialble on Google, IBM, Medium, Azure, etc. but I cannot find a straightforward solution to what I am looking for (or more likely, I am not experienced enough to understand the docs, this is my first time using an API like this). The Google tutorial demonstrated how to make calls with an existing audio file, but no such demo for capturing input from microphone.
I understand the process behind the Web Speech API and I can get the demo provided by Twilio to work , but I specifically want to use Watson, Azure, or Google so that it can guess at punctuation and deliver a "cleaner" result.
Does anyone have any resources they could share or tips that are more straightforward or appropriate for a beginner? Thank you so much!
voice recording spectrogram with matlab
i want to record a voice with a music in background in Matlab, and then separate them so that the voice will be distinguished from music, if anyone can help then it would be appreciated.
Reading audio file and converting into text using Azure Speech services in python, but only the first sentence is converted into speech
Below is the code,
speech_key, service_region = "1996", "eastus" speech_config = speechsdk.SpeechConfig(subscription=speech_key, region=service_region) audio_config = speechsdk.audio.AudioConfig(filename='newwavfile.wav') speech_recognizer = speechsdk.SpeechRecognizer(speech_config=speech_config, audio_config=audio_config) result = speech_recognizer.recognize_once_async() type(result) print(result.get())
SpeechRecognitionResult(result_id=85c3bcd7489547d5a521776897f6dcc4, text="Hello Hello.", reason=ResultReason.RecognizedSpeech)
Only the first sentence from audio file is converted, how can get the whole audio file converted into text..
Calculate the percentage of accuracy with which user made the assigned sound
I want to design a web-app for my cousin who is 2 years of age in which i have implemented a functionality in which when an image is clicked some sound gets played and the user has to make the same sound which gets recorded.
For eg-If i click on image of "Apple" the sound made is "A for Apple".Now the user has to say those words which get recorded.
Now I want to calculate the percentage of accuracy with which the user spoke.I want to know how can i know the accuracy percentage.I have not used machine learning or Natural Language Processing earlier so i want some guidance on what should i learn about or ways of implementing this functionality.I need some help on that.
Also use nodejs frameworks quite frequently so is there any module in nodejs with the help of which the above requirement can be fulfilled.
speech synthesis API's thats works in android webview
I have developed a web page that uses speech synthesis API, for chatting with users. webpage works fine(i.e takes voice input and gives voice response) on windows & android chrome browser. but it's not working in android webview (not provide a response in audio). so is there any way to make it work on android webview.what are the other options available so that webpage works everywhere. like this https://www.botlibre.com/ it works on web and mobile chrome along with webview in android.
How to make notification with a speech in Swift
I've been looking for how to make notification with a speech in Swift on Google but until now I don't find any solution. When a notification appears on Home Screen, I want the system to read notification with a speech.
So how would I accomplish this?