linux

Speech SDK trowing error: Exception with an error code: 0xe (SPXERR_MIC_NOT_AVAILABLE)

Speech SDK trowing error: Exception with an error code: 0xe (SPXERR_MIC_NOT_AVAILABLE) Question: I have a small script in python: def listen(language): speech_config.speech_recognition_language=language audio_config = speechsdk.audio.AudioConfig(use_default_microphone=True) speech_recognizer = speechsdk.SpeechRecognizer(speech_config=speech_config, audio_config=audio_config) print("Speak into your microphone.") speech_recognition_result = speech_recognizer.recognize_once_async().get() if speech_recognition_result.reason == speechsdk.ResultReason.RecognizedSpeech: print("Recognized: {}".format(speech_recognition_result.text)) return speech_recognition_result.text This code is derived from the QuickStart SpeechSDK Tutorial found here:https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-speech-to-text?tabs=linux%2Cterminal&pivots=programming-language-python …

Total answers: 1

Scheduled python code can't find module when run in Docker

Scheduled python code can't find module when run in Docker Question: I’m trying to run a python script inside a Docker container every 2 minutes. To achieve this, I am using a cron job. When I run the Python script on the host machine, it executes perfectly, but inside the docker container I keep getting …

Total answers: 3

GPS data storage system

GPS data storage system Question: I have a python script written using twisted module which is running on an ubuntu server as a service. We have many gps devices which sends data every 10 sec. My job is to parse that data and store it in database. Everything is working fine, but total number of …

Total answers: 2

How to set the LANG for a python script running through systemd?

How to set the LANG for a python script running through systemd? Question: On the server where I run the program the default encoding is latin-1, and when I try to run a python script I get an error like ‘latin-1’ codec can’t encode characters in position, etc. I know you can change the default …

Total answers: 1

Linux NoHup fails for Streaming API IG Markets where file is python

Linux NoHup fails for Streaming API IG Markets where file is python Question: This is quite a specific question regarding nohup in linux, which runs a python file. Back-story, I am trying to save down streaming data (from IG markets broadcast signal). And, as I am trying to run it via a remote-server (so I …

Total answers: 1

tkinter window will not pop up

tkinter window will not pop up Question: I am doing a project with tkinter. I’ve recently switched to linux Mint on my computer. The program runs fine with no errors, the gui just won’t come up. I’m using pycharm. import sys from tkinter import * THEME_COLOR = "#375362" class QuizInterface: def __int__(self): self.window = Tk() …

Total answers: 1

Python write bytes to file using redirect of print

Python write bytes to file using redirect of print Question: using perl, $ perl -e ‘print "xca"’ > out now $ xxd out we have 00000000: ca But with Python, I tried $ python3 -c ‘print("xca", end="")’ > out $ xxd out what I got is 00000000: c38a I’m not sure what is going on. …

Total answers: 2

Can pyinstaller make a desktop file (with an icon) for an Ubuntu python app

Can pyinstaller make a desktop file (with an icon) for an Ubuntu python app Question: I’m building a python app which is to pack up as a single executable and work on Windows, MacOS and Linux. Have made a lot of progress and am using a workflow on Github to build using pyinstaller for each …

Total answers: 2