Skip to content

Commit

Permalink
issue #51 added a call result to external client response
Browse files Browse the repository at this point in the history
  • Loading branch information
schnelle committed Apr 3, 2024
1 parent bacded1 commit d6d1c67
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 11 deletions.
16 changes: 15 additions & 1 deletion source/SOURCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You will need
- A C/C++ compiler supporting at least C++ 17
- CMake version 3.24
- a local copy of libcurl https://curl.se/download.html so that it can be found
by FindPackage
by FindPackage on Windows systems
- A C++ IDE of your choice
- An OpenAI developer key

Expand Down Expand Up @@ -64,13 +64,27 @@ Replace OPENAI-DEVELOPER-KEY with your actual key

### Manual Build

On Windows systems

```
cd source/w3cipa
mkdir build
cd build
cmake .. -DCURL_INCLUDE_DIR=<Your path to the CURL include directory> -DCURL_LIBRARY=<Your path to the CURL library directory>
make && make install
```

On Linux based systems or any other

```
cd source/w3cipa
mkdir build
cd build
cmake ..
make && make install
```


## Open Issues

A list of open issues can be displayed via
Expand Down
1 change: 1 addition & 0 deletions source/w3cipa/w3cipaframework/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ set(HEADERS
include/w3c/voiceinteraction/ipa/AudioData.h
include/w3c/voiceinteraction/ipa/AudioDeliveryType.h
include/w3c/voiceinteraction/ipa/AudioEncoding.h
include/w3c/voiceinteraction/ipa/CallResult.h
include/w3c/voiceinteraction/ipa/ClientInput.h
include/w3c/voiceinteraction/ipa/ClientRequest.h
include/w3c/voiceinteraction/ipa/ClientResponse.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ enum AudioDeliveryType
} // namespace voiceinteraction
} // namespace w3c

#endif // !defined(EA_C8411B85_9B7F_4a80_BD05_97815CF258AD__INCLUDED_)
#endif // !defined(AUDIODELIVERYTYPE_H)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* IPA Reference Implementation: https://github.com/w3c/voiceinteraction
*
* Copyright (C) 2024 World Wide Web Consortium. All Rights Reserved.
*
* This work is distributed under the W3C Software and Document License [1]
* in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* [1] https://www.w3.org/Consortium/Legal/copyright-software
*/

#if !defined(CALL_RESULT_H)
#define CALL_RESULT_H

namespace w3c {
namespace voiceinteraction {
namespace ipa {

/**
* Indicator to success or failure.
* @author Dirk Schnelle-Walka
*/
enum CallResult
{
/**
* A call has been completed successfully.
*/
SUCCESS = 0,
/**
* There was an error in the call.
*/
FAILURE = 1
};

} // namespace ipa
} // namespace voiceinteraction
} // namespace w3c

#endif // !defined(CALL_RESULT_H)
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include <memory>

#include "CallResult.h"
#include "ErrorMessage.h"
#include "MultiModalOutputs.h"
#include "RequestId.h"
Expand Down Expand Up @@ -84,6 +85,12 @@ class ExternalClientResponse
*/
const std::shared_ptr<SemanticInterpretation> getSemanticInterpretation() const;

/**
* Checks if there was an error in the call.
* @return {@link CallResult#SUCCESS} in case there was no error.
*/
CallResult getCallResult() const;

/**
* Checks if this reponse includes an error
* @return {@code true} if the response includes an error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ const std::shared_ptr<SemanticInterpretation> ExternalClientResponse::getSemanti
return interpretation;
}

CallResult ExternalClientResponse::getCallResult() const {
if (error == nullptr) {
return CallResult::SUCCESS;
} else {
return CallResult::FAILURE;
}
}

bool ExternalClientResponse::hasError() const {
return error != nullptr;
}
Expand Down
19 changes: 10 additions & 9 deletions voice interaction drafts/paArchitecture/paArchitecture-1-3.htm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2 property="bibo:subtitle" id="subtitle">Architecture and
<dl>
<dt>Latest version</dt>
<dd>
Last modified: March 21, 2023 <a
Last modified: April 3, 2024<a
href="https://github.com/w3c/voiceinteraction/blob/master/voice%20interaction%20drafts/paArchitecture/paArchitecture-1-3.htm">https://github.com/w3c/voiceinteraction/blob/master/voice%20interaction%20drafts/paArchitecture/paArchitecture-1-3.htm</a>
(GitHub repository)
</dd>
Expand All @@ -34,8 +34,8 @@ <h2 property="bibo:subtitle" id="subtitle">Architecture and
</dd>
<dt>Editors</dt>
<dd>
Dirk Schnelle-Walka<br /> Deborah Dahl, Conversational
Technologies
Dirk Schnelle-Walka<br />
Deborah Dahl, Conversational Technologies
</dd>
</dl>

Expand Down Expand Up @@ -454,12 +454,13 @@ <h2 id="architecture">
<figure> <img src="Basic-IPA-Architecture-1-3.svg"
alt="Basic IPA Architecture" style="width: 100%; height: auto;" />
<figcaption>Fig. 1 Basic architecture of an IPA</figcaption> </figure>
<p>This architecture follows a traditional partitioning of
conversational systems, with separate components for speech
recognition, natural language understanding, dialog management,
natural language generation, and audio output, (audio files or
text to speech). This architecture does not rule out combining
some of these components in specific systems.</p>
<p>This architecture aims at following both, a traditional
partitioning of conversational systems, with separate components
for speech recognition, natural language understanding, dialog
management, natural language generation, and audio output,
(audio files or text to speech) as well as newer LLM (Large
Language Model) based approaches. This architecture does not
rule out combining some of these components in specific systems.</p>

<p>This architecture aims at serving, among others, the
following most popular high-level use cases for IPAs</p>
Expand Down

0 comments on commit d6d1c67

Please sign in to comment.