question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Python function speak_ssml has lost return value

See original GitHub issue

Describe the bug Hi,

I could not find an upstream repo of the azure-cognitiveservices-speech Python package, so I’m reporting it here as it seems to be the closest repository available.

In the version 1.23.0, the function speak_ssml had a return value:

    def speak_ssml(self, ssml: str) -> SpeechSynthesisResult:
        """
        Performs synthesis on ssml in a blocking (synchronous) mode.
    
        :return: A SpeechSynthesisResult.
        """
        return SpeechSynthesisResult(self._impl.speak_ssml(ssml))

In the latest version, 1.24.0, it has lost the return statement (same applies to the speak_text function):

    def speak_ssml(self, ssml: str) -> SpeechSynthesisResult:
        """
        Performs synthesis on ssml in a blocking (synchronous) mode.
    
        :returns: A SpeechSynthesisResult.
        """
        self.speak_ssml_async(ssml).get()

To Reproduce Install packages 1.23.0 and 1.24.0 and see for yourself.

Expected behavior Functions still return values as they claim in the docs comment.

Version of the Cognitive Services Speech SDK 1.24.0

Platform, Operating System, and Programming Language

  • Linux
  • x64
  • Python

Additional context pylint reported this issue after I updated my dependencies:

 E1111: Assigning result of a function call, where the function has no return (assignment-from-no-return)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rhureycommented, Oct 24, 2022

Thanks for pointing this out, it’s being fixed and will be in the next release.

0reactions
msehnoutcommented, Nov 2, 2022

It works! Thanks 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Return statement in python function not returning anything
You are not receiving the output the function is returning. This will show the result. Functions return a value, so you need to...
Read more >
Python return statement
The python return statement is used to return values from the function. We can use the return statement in a function only.
Read more >
12.5. Returning a value from a function
All Python functions return the special value None unless there is an explicit return statement with a value other than None . Consider...
Read more >
Null in Python: Understanding Python's NoneType Object
None is the value a function returns when there is no return statement in the ... None also often used as a signal...
Read more >
What Does Return Minus -1 Do in Python?
If the return value from a function is -1, it holds a special meaning in Python — it usually denotes an error or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found